- From: Preet <notifications@github.com>
- Date: Sat, 22 Jun 2019 12:00:26 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 22 June 2019 19:00:51 UTC
Are there any discussions to support updating the implementation of a custom element definition? (Searched and did not spot anything obvious) Something like this: ```javascript customElements.define('my-element', MyElement); // ... // some time later... customElements.redefine('my-element', MyElement2); ``` I can see a lot of issues with this, the obvious one being what happens to existing elements that are already in the DOM - are they recreated? left alone with old implementation? Or just turned into no-ops? ### Use case Let's say, I have a web component that is sitting on a page with long life time .- say email client or stock dashboard which people have open all the time and rarely 'refresh'. The client code at some point realized there's a new version of `my-element` available and I want to upgrade it to the latest without reloading the whole page. This is particularly useful if there's some sort of change in the protocol/api the custom element may use with the back end. -- 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/820
Received on Saturday, 22 June 2019 19:00:51 UTC