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

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

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

            Bug ID: 29421
           Summary: Should getters on a global without an explicit 'this'
                    really throw TypeError?
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: dchris@gmail.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org
  Target Milestone: ---

According to [1], the getter should use 'this' value and does not mention
anything about using something else when there is no explicit this.

The section about [ImplicitThis][2] clearly states that it applies to
operations but NOT attribute getters, and that throwing is the right thing to
do for attribute getters.

The section about operations [3] does state:
Otherwise, if the interface on which the operation appears has an
[ImplicitThis] extended attribute, and the this value is null or undefined,
then O is the ECMAScript global object associated with the Function object.

Should the attribute getter section be updated to do the same thing as
operations when  [ImplicitThis] is specified? This seems to be Firefox's
behavior. idlharness.js, which is used by W3C web-platform-tests also tests
that attribute getters on the Window do not require an explicit 'this'. I tried
filing a bug against idlharness.js [4][5] but Ms2ger suggested I file a bug
against the Web IDL specification instead.

[1] http://heycam.github.io/webidl/#dfn-attribute-getter
[2] http://heycam.github.io/webidl/#ImplicitThis
[3] http://heycam.github.io/webidl/#es-operations
[4] https://github.com/w3c/testharness.js/issues/182
[5] https://github.com/w3c/testharness.js/pull/183

You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 5 February 2016 17:04:33 UTC

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