<?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>26179</bug_id>
          
          <creation_ts>2014-06-23 15:50:43 +0000</creation_ts>
          <short_desc>toString should be non enumerable</short_desc>
          <delta_ts>2016-04-21 09:53:38 +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>All</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">erik.arvidsson</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>jl</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>sof</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108222</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2014-06-23 15:50:43 +0000</bug_when>
    <thetext>The toString function should be non enumerable to match ES builtins.

http://heycam.github.io/webidl/#es-stringifier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108223</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-23 16:34:36 +0000</bug_when>
    <thetext>Does that match current UA behavior for HTMLAnchorElement and Location?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108225</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2014-06-23 16:54:06 +0000</bug_when>
    <thetext>Chrome, Firefox &amp; IE:

window.location.propertyIsEnumerable(&apos;toString&apos;)
false

Chrome, Firefox &amp; IE:

document.createElement(&apos;a&apos;).propertyIsEnumerable(&apos;toString&apos;)
false


However:

Chrome:

HTMLAnchorElement.prototype.propertyIsEnumerable(&apos;toString&apos;)
false

Firefox &amp; IE:

HTMLAnchorElement.prototype.propertyIsEnumerable(&apos;toString&apos;)
true

This looks like a bug in IE&apos;s and Firefox&apos;s DOM bindings</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108226</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-23 17:09:08 +0000</bug_when>
    <thetext>&gt; document.createElement(&apos;a&apos;).propertyIsEnumerable(&apos;toString&apos;)

The property is not a property on the element itself.  It&apos;s a property on the prototype.  Nonexistent properties report &quot;false&quot; from propertyIsEnumerable (see ES6 19.1.3.4 step 7).  You&apos;d get false for document.createElement(&apos;a&apos;).propertyIsEnumerable(&apos;oblongify&apos;) too.

So it sounds like in Firefox and IE this is an enumerable property on the prototype, as per current spec.  It&apos;s not clear what you think the bug in their binding implementations is, exactly unless it&apos;s &quot;not matching the behavior I want for this property&quot;...

Now maybe we can change browser behavior without breaking sites, given that the property is not enumerable in Chrome.  I checked, and it&apos;s not enumerable in Safari either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108227</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-23 17:09:43 +0000</bug_when>
    <thetext>HTMLAnchorElement.prototype.toString is enumerable in Presto-based Opera, fwiw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108243</commentid>
    <comment_count>5</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2014-06-23 20:35:17 +0000</bug_when>
    <thetext>(In reply to Boris Zbarsky from comment #3)
&gt; &gt; document.createElement(&apos;a&apos;).propertyIsEnumerable(&apos;toString&apos;)
&gt; 
&gt; The property is not a property on the element itself.  It&apos;s a property on
&gt; the prototype.  Nonexistent properties report &quot;false&quot; from
&gt; propertyIsEnumerable (see ES6 19.1.3.4 step 7).  You&apos;d get false for
&gt; document.createElement(&apos;a&apos;).propertyIsEnumerable(&apos;oblongify&apos;) too.

I forgot that propertyIsEnumerable is only for own properties. Then the IE and FF results are consistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125943</commentid>
    <comment_count>6</comment_count>
    <who name="">sof</who>
    <bug_when>2016-04-20 13:56:57 +0000</bug_when>
    <thetext>Blink is phasing out the use of non-enumerable toString() and implementing &apos;stringifier&apos; as spec&apos;ed; see https://bugs.chromium.org/p/chromium/issues/detail?id=306606 and an initial set of these changes ( https://codereview.chromium.org/1905553002/ )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125944</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-04-20 14:05:32 +0000</bug_when>
    <thetext>Sigbjørn, does that mean we can close this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125945</commentid>
    <comment_count>8</comment_count>
    <who name="">sof</who>
    <bug_when>2016-04-20 14:47:53 +0000</bug_when>
    <thetext>How you handle long-opened bugs with no activity I will leave up to you :)

Moving Blink to be stringifier-compatible seems preferable by now; we&apos;ll try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125985</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2016-04-21 08:50:30 +0000</bug_when>
    <thetext>I think this should be closed, these changes will bring Blink in line with Edge and Firefox, so there&apos;s not much reason to think it would change again once interoperable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125987</commentid>
    <comment_count>10</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-04-21 09:53:38 +0000</bug_when>
    <thetext>WONTFIXING since all implementations will seemingly align here with what was already required.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>