I attempted to create a custom element in a Chrome extension but customeElements.define
is null
.
customElements.define(\'customElement\
You may want to first check this article to fully understand what custom elements do and how to build them. As discussed, in building a custom element, you also need to check if document.registerElement
is available. Otherwise, you can simply load webcomponents.js
to polyfill it.
Here are additional references that you may want to check for additional insights.
webcomponentsjs polyfill
.
Chrome will prevent native registerElement
from being executed within a chrome extension.