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

@@ -1,6 +1,19 @@
"use strict";
import { onMessageResponse, sendMessage } from "./eventMessageChannel";
import { loadScript } from "../lib/utils";
const { isFramework }
: { isFramework: boolean } = (window as any);
/**
* Framework API library requires webcomponents for the cast
* button custom element (<google-cast-launcher>).
*/
if (isFramework) {
loadScript(browser.runtime.getURL("vendor/webcomponents-lite.js"));
}
// Message port to background script