[webcomponents] [Custom Elements]: When is "created" callback invoked? (bugzilla: 14987) (#262)

Title: [Custom Elements]: When is "created" callback invoked? (bugzilla: 14987)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14987

----
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14987#c0
*Dimitri Glazkov* wrote on 2011-11-29 00:31:57 +0000.

As raised by Jonas:

The "created" callback is the way for custom elements to participate in construction of the element, set up event listeners, private state, etc.

However, this means that there's an undesirable side effect of running script at parse time, which will affect performance and possibly introduce security troubles.

If we invoke the callback after construction, it's a bit too late and the element is already set up.

Gotta figure out something in between here.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/262

Received on Monday, 6 July 2015 07:43:59 UTC