mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
Minor cast.framework changes
This commit is contained in:
@@ -7,13 +7,14 @@ import { onMessage } from "./messageBridge";
|
||||
|
||||
const global = (window as any);
|
||||
|
||||
if (!global.chrome) {
|
||||
global.chrome = {};
|
||||
}
|
||||
|
||||
global.chrome = {};
|
||||
global.chrome.cast = cast;
|
||||
|
||||
|
||||
/**
|
||||
* If loaded within a page via a <script> element,
|
||||
* document.currentScript should exist and we can check its
|
||||
* [src] query string for the loadCastFramework param.
|
||||
*/
|
||||
if (document.currentScript) {
|
||||
const currentScript = (document.currentScript as HTMLScriptElement);
|
||||
const currentScriptUrl = new URL(currentScript.src);
|
||||
|
||||
Reference in New Issue
Block a user