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 22521 - [Custom]: Element constructor algorithm bleeds definitions across registration contexts
Summary: [Custom]: Element constructor algorithm bleeds definitions across registratio...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2013-06-30 04:54 UTC by Dominic Cooney
Modified: 2013-07-09 20:38 UTC (History)
0 users

See Also:


Attachments

Description Dominic Cooney 2013-06-30 04:54:56 UTC
Step 3.7 of the element constructor algorithm may bleed a definition across registration contexts. For example:

1. Create a Custom Element in an iframe.
2. Disclose the constructor to a different window using JavaScript.
3. Call the constructor from JavaScript in that window.

Step 3.7 is problematic because it initializes the element and calls the ready callback. But this could be happening in a different registration context (and in fact the original frame may be gone.)

I think the element constructor algorithm needs to add a step:

3.0 If DOCUMENT's CONTEXT is different to the CONTEXT associated with DEFINITION, throw an InvalidStateError.
Comment 1 Dimitri Glazkov 2013-07-09 20:38:11 UTC
https://dvcs.w3.org/hg/webcomponents/rev/723367db9fa7