Fix webcomponents polyfill loading

This commit is contained in:
hensm
2019-07-02 05:08:49 +01:00
parent 5fd0649200
commit 98656874f1
4 changed files with 23 additions and 10 deletions

View File

@@ -257,6 +257,15 @@ browser.menus.onShown.addListener(info => {
*/
browser.webRequest.onBeforeRequest.addListener(
async details => {
await browser.tabs.executeScript(details.tabId, {
code: `
window.isFramework = ${
details.url === CAST_FRAMEWORK_LOADER_SCRIPT_URL};
`
, frameId: details.frameId
, runAt: "document_start"
});
await browser.tabs.executeScript(details.tabId, {
file: "shim/contentBridge.js"
, frameId: details.frameId