<time-formatted>
๐ Example: โtime-formattedโ (JS.info)
๐ Intl.DateTimeFormat (MDN)
๐พ replit
Custom Element Upgrade
The process of calling customElements.define() and endowing an existing element with a class definition is called "element upgrades". ๐ Google โฉ Element Upgrades
If browser encounters<time-formatted>
elements beforecustomElements.define
, the element is yet unknown, just like any non-standard tag.
undefined elements can be styled with CSS selector
:not(:defined)
.
When customElement.define
is called, they are โupgradedโ: a new instance of TimeFormatted
is created for each, and connectedCallback
is called.
They become
:defined
. ๐ pseudo-class
code
Last updated