data-uri-scheme

Detect if browser supports data uri scheme with iframes

你离开我真会死。 提交于 2019-12-18 06:31:26
问题 Internet Explorer does not support the data uri scheme for iframe urls (see http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx). Other browsers do. As browser detection is loaded with testing and future-proofing problems, I want to use feature detection to work around this issue. So: how can I detect whether or not a browser supports the data uri scheme for iframes? 回答1: This solution by Kevin Martin is tested and seems to be giving the correct result in IE, FF and Chrome:

chrome.tabs.executeScript into dataURI tab

偶尔善良 提交于 2019-11-29 15:36:49
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 . Agreeing with Xan, it's a chromium bug that extensions cannot work on data URIs. A

Detect if browser supports data uri scheme with iframes

蹲街弑〆低调 提交于 2019-11-29 11:11:57
Internet Explorer does not support the data uri scheme for iframe urls (see http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx ). Other browsers do. As browser detection is loaded with testing and future-proofing problems, I want to use feature detection to work around this issue. So: how can I detect whether or not a browser supports the data uri scheme for iframes? This solution by Kevin Martin is tested and seems to be giving the correct result in IE, FF and Chrome: function iframeDataURITest(src) { var support, iframe = document.createElement('iframe'); iframe.style.display

chrome.tabs.executeScript into dataURI tab

*爱你&永不变心* 提交于 2019-11-28 08:56:32
问题 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.... 回答1: 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 -