[w3c/webcomponents] Further upgrade of custom elements (#620)

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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/620

Received on Thursday, 29 December 2016 09:54:02 UTC