« Bugzilla Issues Index

#284 — Coverage: missing tests for this in the context of getters

As discussed on es-discuss [1], no current browser conforms to section 10.4.3 [2] regarding the `ThisBinding` inside a getter.

This can be shown with a JSFiddle testcase [3], the correct output of which would be

number number
object object

i.e. consistency between functions and getters.

Some tests along the lines of those that already exist for 10.4.3, simply with getters instead of `` function calls, would be a good addition to the suite.


Once the latest set of test contributions from Microsoft make it through, we'll be missing coverage for:
Object.defineProperty(Object.prototype, "getMeStrict", {
get: function() {
"use strict";
document.getElementById("typeof-strict-2").textContent = typeof this;
only. ch10/10.4/10.4.3/10.4.3-1-59-s.js should be permuted for this.