<?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>22192</bug_id>
          
          <creation_ts>2013-05-29 05:45:31 +0000</creation_ts>
          <short_desc>[Custom]: Perhaps element&apos;s last completion value should not be from an exceptional termination?</short_desc>
          <delta_ts>2013-05-29 21:06:06 +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>18719</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>88363</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-05-29 05:45:31 +0000</bug_when>
    <thetext>&quot;Let PROPERTIES be DOCUMENT&apos;s last completion value&quot;

I think &apos;throw&apos; establishes a completion value, so for example this:

&lt;element name=&quot;sur-prise&quot;&gt;
  &lt;template&gt;...&lt;/template&gt;
  &lt;script&gt;
    var t = document.currentScript.parentElement.querySelectorAll(&apos;template&apos;);
    var defensiveCopy = t.content.cloneNode();
    ({
      readyCallback: function () {
        var root = this.createShadowRoot();
        root.appendChild(defensiveCopy.cloneNode());
      }
    });
  &lt;/script&gt;
&lt;/element&gt;

Will create a Custom Element with a prototype with &apos;message&apos; and &apos;stack&apos; because those are the own properties of the exception generated at t.content.cloneNode (because I &quot;accidentally&quot; did querySelectorAll instead of querySelector, so t is a NodeList and t.content is undefined; undefined.cloneNode() throws; etc.)

Maybe custom element processing should not set up this funkified prototype if the script exits with an error exit?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88403</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-05-29 21:06:06 +0000</bug_when>
    <thetext>Good point!

https://dvcs.w3.org/hg/webcomponents/rev/29a89e926f94</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>