1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Any copyright is dedicated to the Public Domain. // http://creativecommons.org/licenses/publicdomain/ // See bug 627984, comment 17, item 2. var obj = {}; var x; obj.watch("m", function (id, oldval, newval) { x = this.m; return newval; }); delete obj.m; obj.m = function () { return this.method; }; obj.m = 2; reportCompare(0, 0, 'ok'); |