mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Fix __onGCastApiAvailable being called early
This commit is contained in:
@@ -35,3 +35,15 @@ export function getWindowCenteredProps (
|
||||
|
||||
// tslint:disable-next-line:max-line-length
|
||||
export const REMOTE_MATCH_PATTERN_REGEX = /^(?:(?:(\*|https?|ftp):\/\/(\*|(?:\*\.(?:[^\/\*:]\.?)+(?:[^\.])|[^\/\*:]*))?)(\/.*)|<all_urls>)$/;
|
||||
|
||||
|
||||
export function loadScript (
|
||||
scriptUrl: string
|
||||
, doc: Document = document): HTMLScriptElement {
|
||||
|
||||
const scriptElement = doc.createElement("script");
|
||||
scriptElement.src = scriptUrl;
|
||||
(doc.head || doc.documentElement).append(scriptElement);
|
||||
|
||||
return scriptElement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user