Descriptionbindings: Makes the default receiver of callbacks "undefined".
http://heycam.github.io/webidl/#es-invoking-callback-functions
By default, "the callback this value" should be "undefined".
In strict mode,
- before: this value was window (global object).
- after: this value is undefined
In non-strict mode,
undefined (or null) this value is converted to the global object.
This conversion is done in V8. So user script observes no change.
See http://www.ecma-international.org/ecma-262/5.1/#sec-10.4.3
Note: This CL changes the callback this value from the window object of the receiver to the global object of the running script.
Example) Suppose running the following script in a child window.
function f() { console.log(this); }
top.requestAnimationFrame(f);
before: this === top
after: this === window (child window)
BUG=332663
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201482
Patch Set 1 #
Messages
Total messages: 11 (3 generated)
|