[Webkit-unassigned] [Bug 126522] New: Named object access properties should be configurable or don't exist at all
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 6 06:39:26 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=126522
Summary: Named object access properties should be configurable
or don't exist at all
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
URL: https://github.com/ajaxorg/ace/issues/1741
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: hartman.wiki at gmail.com
This is about the side effects of http://www.w3.org/TR/html5/browsers.html#named-access-on-the-window-object
It seems the properties that this named access creates on the window object are non-configureable. This makes it 'randomly'/'DOM dependent' impossible to create properties on the window object. Apparently Safari is the only browser that has them unconfigurable and the only browser that has them defined as actually properties. There might be a good reason for this (security ?). However, it's annoying, especially for JS libraries that might be deployed. This impredictability of which properties on your window object are defined makes this a nuisance to developers and more so. I think this should be changed.
I ran into this problem here: https://github.com/ajaxorg/ace/issues/1741
Additionally specific to Safari, this seems to create a problem with local declared but uninitialized variables, which might be even more problematic. This problem is detailed in the console.log example in http://dertompson.com/2013/08/07/named-access-on-the-window-object-in-safari/
This might give a scripter unintentional and obscured access to these named objects causing unpredictable results.
Further background reading materials:
http://tjvantoll.com/2012/07/19/dom-element-references-as-global-variables/
https://www.w3.org/Bugs/Public/show_bug.cgi?id=11960
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list