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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/03ff8bd4-89a9-4dd7-ac5f-f54043375d8b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to