@codebakery/origami
Version:
Angular + Polymer
21 lines (20 loc) • 700 B
TypeScript
declare global {
interface Window {
CustomElementRegistry: {
new (): CustomElementRegistry;
prototype: CustomElementRegistry;
};
}
}
/**
* Shims `window.customElements` with a placeholder that allows custom elements
* to define themselves before the WebComponents polyfill is ready. When the
* polyfill loads, the element definitions will be defined with the polyfilled
* `customElements`.
*
* This allows the developer to import files that call `customElements.define()`
* without having to delay loading the app via `webcomponentsReady()`.
*
* This is automatically called by Origami.
*/
export declare function shimCustomElements(): void;