[Webkit-unassigned] [Bug 17146] global variable declarations should shadow window properties from named elements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 2 13:37:39 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=17146
------- Comment #4 from dhtmlkitchen at gmail.com 2008-02-02 13:37 PDT -------
Created an attachment (id=18874)
--> (http://bugs.webkit.org/attachment.cgi?id=18874&action=view)
ID (not NAME) creates discrepent behavior with variable binding
The first half of my last comment was inaccurate. Please disregard (I can't
edit that)
====
Binding Variables to Global Object props:
This means that in global scope/context |this| is the global object. Variables
of the global object become properties:
var x = 1;
equivalent to:
this.x = 1;
magic-prop: a property that was created automagically by the browser from an
element's ID.
Binding Variables of same-named magic-props to Global Object as Properties (use
var)
IE: replace the default attributes that the variable was given. It's not
readonly after binding.
Webkit: Do not bind.
Assigning to window auto-properties (no var)
IE: When assigning to a of window auto-prop, fail silently, as if it were
ReadOnly.
Webkit: allow assignment.
That is why usevar is available in Webkit. Webkit doesn't bind it as a
property.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list