@aurelia/platform-browser
Version:
[](https://opensource.org/licenses/MIT) [](http://www.typescriptlang.org/) [ • 1.01 kB
JavaScript
import { Platform as e } from "@aurelia/platform";
class BrowserPlatform extends e {
static getOrCreate(e, t = {}) {
let r = BrowserPlatform.t.get(e);
if (r === void 0) {
BrowserPlatform.t.set(e, r = new BrowserPlatform(e, t));
}
return r;
}
static set(e, t) {
BrowserPlatform.t.set(e, t);
}
constructor(e, t = {}) {
super(e, t);
const notImplemented = e => () => {
throw new Error(`The PLATFORM did not receive a valid reference to the global function '${e}'.`);
};
("Node Element HTMLElement CustomEvent CSSStyleSheet ShadowRoot MutationObserver " + "window document customElements").split(" ").forEach(r => this[r] = r in t ? t[r] : e[r]);
"fetch requestAnimationFrame cancelAnimationFrame".split(" ").forEach(r => this[r] = r in t ? t[r] : e[r]?.bind(e) ?? notImplemented(r));
}
}
BrowserPlatform.t = new WeakMap;
export { BrowserPlatform };
//# sourceMappingURL=index.mjs.map