Why can't you create Custom Elements in Chrome Extensions?

后端 未结 2 684
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 01:44

I attempted to create a custom element in a Chrome extension but customeElements.define is null.

customElements.define(\'customElement\         


        
2条回答
  •  南笙
    南笙 (楼主)
    2021-02-19 01:59

    As of now custom element can be used in chrome extensions UI. In Popup ui, option page ui and in the content script as well But it requires a polyfill which is this. https://github.com/GoogleChromeLabs/ProjectVisBug - this is the one big custom element in the chrome extension.

提交回复
热议问题