This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14987 - [Custom Elements]: When is "created" callback invoked?
Summary: [Custom Elements]: When is "created" callback invoked?
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 00:31 UTC by Dimitri Glazkov
Modified: 2015-07-06 08:11 UTC (History)
1 user (show)

See Also:


Attachments

Description Dimitri Glazkov 2011-11-29 00:31:57 UTC
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.
Comment 1 Hayato Ito 2015-07-06 08:11:58 UTC
Moved to https://github.com/w3c/webcomponents/issues/262