@aurelia/platform-browser
Version:
[](https://opensource.org/licenses/MIT) [](http://www.typescriptlang.org/) [ • 1.04 kB
JavaScript
;
var e = require("@aurelia/platform");
class BrowserPlatform extends e.Platform {
static getOrCreate(e, r = {}) {
let t = BrowserPlatform.t.get(e);
if (t === void 0) {
BrowserPlatform.t.set(e, t = new BrowserPlatform(e, r));
}
return t;
}
static set(e, r) {
BrowserPlatform.t.set(e, r);
}
constructor(e, r = {}) {
super(e, r);
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(t => this[t] = t in r ? r[t] : e[t]);
"fetch requestAnimationFrame cancelAnimationFrame".split(" ").forEach(t => this[t] = t in r ? r[t] : e[t]?.bind(e) ?? notImplemented(t));
}
}
BrowserPlatform.t = new WeakMap;
exports.BrowserPlatform = BrowserPlatform;
//# sourceMappingURL=index.cjs.map