Changes to apply/call this coercion (was: ES3.1 Draft: 27 Oct 2008 version available)

Robert Sayre sayrer at
Mon Oct 27 12:04:16 PDT 2008

Pratap Lakshman (VJ#SDK) wrote:
> I have uploaded to the wiki (link <>) the 27 Oct 2008 draft of the specification for ES3.1. This is in the form of in-place edits and markups to the ES3 specification. Revision history is at the end of the document.

(I see multiple problems with these edits--I will address them separately)

These edits to call and apply look like unacceptable, incompatible
changes to ECMAScript-262 3rd edition.

The following test passes in JS shells from Mozilla, WebKit, and Chrome:

---------------- = "bar";

function test(didPass, name) {
   print((didPass ? "PASS" : "FAIL") + " " + name);

var f = function() {
   test( == "bar", "undefined/null thisArg");

var g = function() {
   test( == "qux", "thisArg supplied");

function testApplyAndCall() {
   f.apply(undefined, []);
   f.apply(null, []);;;

   var obj = {foo: "qux"};

   g.apply(obj, []);
   g.apply(obj, []);;;



- Rob


Robert Sayre

"I would have written a shorter letter, but I did not have the time."

More information about the Es-discuss mailing list