<?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>25813</bug_id>
          
          <creation_ts>2014-05-19 19:46:57 +0000</creation_ts>
          <short_desc>[Custom]: Throw Exception when EXTENDS and PROTOTYPE have a mismatch</short_desc>
          <delta_ts>2015-01-05 11:36:59 +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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Daniel Freedman">dfreedm</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>annevk</cc>
    
    <cc>dominicc</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106367</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Freedman">dfreedm</who>
    <bug_when>2014-05-19 19:46:57 +0000</bug_when>
    <thetext>Given the current spec language, it is possible to construct an element that claims to extend from something like HTMLButtonElement, but does not have one in the prototype.

Example:

document.registerElement(&apos;not-input&apos;, {
  extends: &apos;input&apos;,
  prototype: HTMLElement.prototype
});

Elements like this will be a footgun, as they will appear to be regular type extension elements, but will be missing expected API and IDL properties (in UAs that implement IDL in prototype).

I think the spec should say that UAs should throw at the registration of such a frankenstien&apos;s monster of an element and spare developers and users from having to double check prototypes of type extensions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106403</commentid>
    <comment_count>1</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2014-05-19 23:24:02 +0000</bug_when>
    <thetext>I don&apos;t think we should make this change. I don&apos;t think there is anything new in this bug report that wasn&apos;t already considered.

IIRC we ended up with the lassez-faire model we have today because it is simpler,  more flexible, it reflects what you can do today with __proto__ twiddling, it doesn&apos;t afford the UA any real protection or benefits because you can always reset the prototype later anyway, and it might have valid (though marginal) uses.

From the implementation&apos;s point of view this is not a huge deal, we would just need to scrabble over the prototype more.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>