W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2016

[Bug 29421] Should getters on a global without an explicit 'this' really throw TypeError?

From: <bugzilla@jessica.w3.org>
Date: Fri, 05 Feb 2016 19:54:05 +0000
To: public-script-coord@w3.org
Message-ID: <bug-29421-3890-3SybAB5l2c@http.www.w3.org/Bugs/Public/>

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> ---
> Yes, I work on WebKit and am currently fixing this issue.

Ah, awesome.  :)

If we spec auto-picking a global, we should fall back to the global of the
Realm of the getter function (basically, do what a non-strict scripted function
would do).  So in your example, for the same-origin case, that would be mean
locationGetter.call() and locationGetter.call(otherWin) do the same thing.

For the cross-origin case, given the current spec proposals for cross-origin
objects, the getter would be created in the Realm of the thing touching the
cross-origin object, so locationGetter.call() would be equivalent to
locationGetter.call(window).  This slight weirdness only affects things one can
get cross-origin on a window, which is just "location"... so I think I'm ok
with it.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 5 February 2016 19:54:09 UTC

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