Object.observe icon indicating copy to clipboard operation
Object.observe copied to clipboard

Object.deliverChangeRecords not available

Open frostney opened this issue 9 years ago • 12 comments

To deliver the change records, this polyfill uses the following API:

var obj = {};
var changeHandler = function(changes) {
  console.log(changes);
};

Object.observe(obj, changeHandler);
obj.test = 5;

Object.getNotifier(obj).deliverChangeRecords();

In regards to the specification (http://wiki.ecmascript.org/doku.php?id=harmony:observe_public_api) and with the latest Chrome stable (36), delivering the change records actually works like this:

var obj = {};
var changeHandler = function(changes) {
  console.log(changes);
};

Object.observe(obj, changeHandler);
obj.test = 5;

Object.deliverChangeRecords(changeHandler);

Is there any chance that Object.deliverChangeRecords will make it into this polyfill?

frostney avatar Jul 21 '14 08:07 frostney