Baseline Widely available
Window
ì¸í°íì´ì¤ì customElements
ì½ê¸° ì ì© ìì±ì ìë¡ì´ ì¬ì©ì ì§ì ìì를 ë±ë¡íê±°ë, ì´ì ì ë±ë¡í ììì ì 보를 ë°ìì¬ ì ìë CustomElementRegistry
ê°ì²´ì 참조를 ë°íí©ëë¤.
customElements
를 ì¬ì©íë ê°ì¥ íí ììë ìë¡ì´ ìì를 ì ìíê³ ë±ë¡í기 ìí´ 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