You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a particular use case that made me wonder if there should be a method for upgrading a single element to a custom class. Like define, but for a specific element, so customElements.upgrade(el,class). I know that WebKit doesn't want to support upgrading builtin elements, but I'm thinking about custom elements.
The use case is the use of custom elements in <template>s where the rendered custom element relies on a link to the source custom element within the template. The element in the template provides extra functionality.
I suppose this can be done simply by changing the constructor or __proto__ of the element, but I'm unaware if that is supported on all browsers. In that case I guess this is not worth adding to the API.
The text was updated successfully, but these errors were encountered:
I have a particular use case that made me wonder if there should be a method for upgrading a single element to a custom class. Like define, but for a specific element, so
customElements.upgrade(el,class)
. I know that WebKit doesn't want to support upgrading builtin elements, but I'm thinking about custom elements.The use case is the use of custom elements in
<template>
s where the rendered custom element relies on a link to the source custom element within the template. The element in the template provides extra functionality.I suppose this can be done simply by changing the
constructor
or__proto__
of the element, but I'm unaware if that is supported on all browsers. In that case I guess this is not worth adding to the API.The text was updated successfully, but these errors were encountered: