Baseline Widely available
customElements
㯠Window
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ã CustomElementRegistry
ãªãã¸ã§ã¯ãã¸ã®ãªãã¡ã¬ã³ã¹ãè¿ãã¾ããããã«ãããæ°ããã«ã¹ã¿ã è¦ç´ ãç»é²ãããã以åã«ç»é²ããã«ã¹ã¿ã è¦ç´ ã«é¢ããæ
å ±ãåå¾ããããããã¨ãã§ãã¾ãã
ãã®ããããã£ã使ããã¦ããæãä¸è¬çãªä¾ã¯ãæ°ããã«ã¹ã¿ã è¦ç´ ãå®ç¾©ã»ç»é²ããããã« CustomElementRegistry.define()
ã¡ã½ããã«ã¢ã¯ã»ã¹ãããã¨ã§ããä¾ãã°æ¬¡ã®ããã«ãã¾ãã
let customElementRegistry = window.customElements;
customElementRegistry.define("my-custom-element", MyCustomElement);
ãããããµã¤ãã¯ä»¥ä¸ã®ããã«ç縮ãã¾ãã
customElements.define(
"element-details",
class extends HTMLElement {
constructor() {
super();
const template = document.getElementById(
"element-details-template",
).content;
const shadowRoot = this.attachShadow({ mode: "open" }).appendChild(
template.cloneNode(true),
);
}
},
);
web-components-examples ãªãã¸ããªã¼ã«ããå¤ãã®ä½¿ç¨ä¾ãããã¾ãã®ã§åç §ãã¦ãã ããã
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4