W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

[Bug 26179] toString should be non enumerable

From: <bugzilla@jessica.w3.org>
Date: Mon, 23 Jun 2014 17:09:08 +0000
To: public-script-coord@w3.org
Message-ID: <bug-26179-3890-UMdqry5DLz@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
> document.createElement('a').propertyIsEnumerable('toString')

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

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

Now maybe we can change browser behavior without breaking sites, given that the
property is not enumerable in Chrome.  I checked, and it's not enumerable in
Safari either.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 23 June 2014 17:09:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC