<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22521</bug_id>
          
          <creation_ts>2013-06-30 04:54:56 +0000</creation_ts>
          <short_desc>[Custom]: Element constructor algorithm bleeds definitions across registration contexts</short_desc>
          <delta_ts>2013-07-09 20:38:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Cooney">dominicc</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90032</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-30 04:54:56 +0000</bug_when>
    <thetext>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&apos;s CONTEXT is different to the CONTEXT associated with DEFINITION, throw an InvalidStateError.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90519</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-09 20:38:11 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/webcomponents/rev/723367db9fa7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>