michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: // See bug 627984, comment 17, item 2. michael@0: var obj = {}; michael@0: var x; michael@0: obj.watch("m", function (id, oldval, newval) { michael@0: x = this.m; michael@0: return newval; michael@0: }); michael@0: delete obj.m; michael@0: obj.m = function () { return this.method; }; michael@0: obj.m = 2; michael@0: michael@0: reportCompare(0, 0, 'ok');