Created
January 11, 2020 14:56
-
-
Save sroehrl/e77ddb9a36478c3ca2791cb1d04782a8 to your computer and use it in GitHub Desktop.
Handling customElements cross-browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _customElementsDefine = window.customElements.define; | |
window.customElements.define = (name, cl, conf) => { | |
if (!customElements.get(name)) { | |
_customElementsDefine.call(window.customElements, name, cl, conf); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment