<?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>22947</bug_id>
          
          <creation_ts>2013-08-13 23:03:28 +0000</creation_ts>
          <short_desc>Operation functions should not have a prototype property</short_desc>
          <delta_ts>2016-10-22 16:06:50 +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>WebIDL</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">erik.arvidsson</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>erights</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92017</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-13 23:03:28 +0000</bug_when>
    <thetext>In Firefox, Safari and IE, the functions used for operations (ie document.appendChild) do not have a prototype property. This is analog with the JS builtins (like Date.prototype.getFullYear)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92253</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-08-19 06:11:36 +0000</bug_when>
    <thetext>WebIDL says nothing about these having a &quot;prototype&quot; own property, so they have nothing there in particular, which matches the implementations...  Maybe I&apos;m missing what this bug is about?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92331</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2013-08-20 14:21:09 +0000</bug_when>
    <thetext>Functions have a prototype property by default. I would like the spec to point out that the functions backing operations are not normal functions and should not have a prototype (same for the getter and setter functions).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92334</commentid>
    <comment_count>3</comment_count>
    <who name="Mark S. Miller">erights</who>
    <bug_when>2013-08-20 14:46:45 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Functions have a prototype property by default. I would like the spec to
&gt; point out that the functions backing operations are not normal functions and
&gt; should not have a prototype (same for the getter and setter functions).

I agree they should not have a prototype property or a [[Construct]] internal method. But I would avoid the phrase &quot;not normal functions&quot;. In ES3 and ES5, all non-constructor Chapter 15 functions are of this form. In ES6, arrow functions are as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92336</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2013-08-20 15:08:57 +0000</bug_when>
    <thetext>I believe ES6 methods do not have `prototype` properties or [[Construct]] internal methods, at least per the non-normative prose [1]. Thus it would suffice to say that WebIDL methods should be created in the same way as ES6 methods.

[1]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.3.4.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127922</commentid>
    <comment_count>5</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-10-22 16:06:50 +0000</bug_when>
    <thetext>Fixed by https://github.com/heycam/webidl/commit/a2b4599631fe0fa254a7a4993dd7f00b74c8ad20 with issue https://github.com/heycam/webidl/issues/106</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>