One potential workaround I've thought of in the context of Polymer
Designer, is to patch up Polymer() to be able to able to redefine elements
- possibly by inserting an extra prototype in the prototype chain just
about the instances, then on redefinition change that object's proto
pointer to the new prototype and skip calling document.registerElement().
I'm not all all sure what might break if I did that, but I'm pretty sure
something would. The fallback is to just reload the page, and try to
serialize the important state in some way.

-Justin


On Mon, Jul 20, 2015 at 11:47 AM, 'Daniel Freedman' via Polymer <
[email protected]> wrote:

> No component definitions are write-once for now (
> https://github.com/w3c/webcomponents/issues/152). There are ideas for v2
> to have CustomElement registries exposed and modifiable, but no concrete
> proposals as far as I know.
>
> On Mon, Jul 20, 2015 at 6:49 AM, phil cleaver <[email protected]>
> wrote:
>
>> Hi,
>>
>> I'm writing an IDE for web components and I'm trying to find a way of
>> changing the definition of a web component at runtime.  If I try to
>> reregister the element I simply get a message that a component with this
>> name already exists.
>>
>> Is there a way to remove a web component definttion from the document so
>> I can reload it?
>>
>> Regards
>>
>> Phil
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/polymer-dev/c51868db-5606-4ae7-ab5e-9bbb61a52f44%40googlegroups.com
>> <https://groups.google.com/d/msgid/polymer-dev/c51868db-5606-4ae7-ab5e-9bbb61a52f44%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/CAAUAVAg%2BqbuGoM5L5pkis4KsFFysx%2B-6ZKymPYS6jG8_EFNAeg%40mail.gmail.com
> <https://groups.google.com/d/msgid/polymer-dev/CAAUAVAg%2BqbuGoM5L5pkis4KsFFysx%2B-6ZKymPYS6jG8_EFNAeg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CAEKsHmCAb1Th4Hw%3Dkf1-DRfAfWsunvdV7qF3DsMH8zQTUNEgbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to