custom element
Last updated
Was this helpful?
Last updated
Was this helpful?
โฉ โฉ โฉ custom elements
associate a JavaScript with an name.
custom element name ไธญ้ไธๅฎ่ฆๆ๏ผ"-
"
ไพๅฆ๏ผ<vstack->
ๆ <v-stack>
ไฝ "-
" ไธ่ฝๆพๅ้ข๏ผ<-vstack>
define new custom elements with .
custom elements render as inline elements by default.
To create a custom element, we need to tell the browser several details about it: how to show it, what to do when the element is added or removed to page, etc.
can I use ?
replit:
We can create our tags by using the object (window.customElements
).
custom element names must contain a hyphen ๐ customElements.()
Custom elements cannot be self-closing because HTML only allows to be self-closing. Always write a closing tag
(<custom-element></custom-element>
)
๐ Google โฉ