Ok thanks!  

On Wednesday, March 5, 2014 11:53:52 AM UTC-8, Scott Miles wrote:
>
> Calling `document.registerElement()` results in immediate (synchronous) 
> upgrade of all matching elements extant in DOM.
>
> Scott
>
>
> On Wed, Mar 5, 2014 at 11:39 AM, <[email protected] <javascript:>>wrote:
>
>> Hi, I'm trying to understand the lifecycle callbacks in the demo app 
>> 'pica'.
>>
>> If I set a break point in components/polymer-elements.js createdCallback:
>>
>>   var prototype = extend(Object.create(HTMLElement.prototype), {
>>
>>     createdCallback: function() {
>>       if (this.getAttribute('name')) {
>>         this.init();
>>       }
>>     },
>>
>> Then the call stack is:
>> d.createdCallback (polymer-element.js:22)
>> (anonymous function) (polymer-element.js:147)
>> (anonymous function) (polymer-element.js:147)
>>
>> where 147 is:
>>  document.registerElement('polymer-element', {prototype: prototype});
>>
>> In the function createdCallback, 'this' is an HTMElement with local name 
>> 'polymer-element'. 
>>
>> I expected this callback when an instance of the custom element 
>> 'polymer-element' is created, not when the type is registered. I could not 
>> find anything in the spec to suggest that registration should have this 
>> effect.
>>
>> What do you expect here?
>> jjb
>>
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/03ff8bd4-89a9-4dd7-ac5f-f54043375d8b%40googlegroups.com<https://groups.google.com/d/msgid/polymer-dev/03ff8bd4-89a9-4dd7-ac5f-f54043375d8b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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/ec5e4e86-fd68-46a5-89b1-c981a1bd91bc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to