10

I am working on a Chrome extension that needs to inject scripts into data:-URI pages.

When trying to execute the javascript I get an exception:

Error during tabs.executeScript: Cannot access contents of url "data:text/html;charset=utf-8, … ". Extension manifest must request permission to access this host.

But which permission would work for me? I tried data:*, <all_urls>, *://*/* - none of these worked. Also the activeTab permission did not do the trick. Any ideas?

343max
  • 400
  • 1
  • 12
  • Possible duplicate of [chrome.tabs.executeScript into dataURI tab](https://stackoverflow.com/questions/31051387/chrome-tabs-executescript-into-datauri-tab) – Denis L Jul 21 '17 at 09:19
  • Someone here claimed it's possible for FF: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-extensions/-CfZ-wO0Wsw . Fking Chrome... – Pacerier Aug 06 '17 at 07:16

1 Answers1

0

It's currently a chromium bug that extensions cannot work on data URIs. A fix is going in that will rectify this, hopefully landing in Chrome 66.

Paul Irish
  • 47,354
  • 22
  • 98
  • 132