chrome.tabs.executeScript到dataURI选项卡中 [英] chrome.tabs.executeScript into dataURI tab

查看:180
本文介绍了chrome.tabs.executeScript到dataURI选项卡中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题非常简单(问)

有没有任何方法可以将脚本注入到仅包含图像
的标签中,并且URL的格式为:

data:image / png; base64,iVBORw0K ....

console给我错误:

无法访问url的内容data:image / png; base64,iVBORw0K ....

解决方案

如答案为否。 data: URI 不支持权限



甚至activeTab< ; all_urls>权限不授予所需的权限。



Chromium bug跟踪器一眼就没有找到一个现有的功能请求 - 您可以试试运气


Question is very simple (to ask)
Is there any way to inject script into tab containing only image
and have URL in form of:
data:image/png;base64,iVBORw0K....

console gives me error:
Cannot access contents of url "data:image/png;base64,iVBORw0K....

解决方案

Looks like the answer is "no". data: URIs are not supported by permissions.

Even "activeTab" or "<all_urls>" permission does not grant the required rights.

A glance on the Chromium bug tracker did not find an existing feature request for that - you may try your luck.

这篇关于chrome.tabs.executeScript到dataURI选项卡中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆