blob: 7aba4a274d71d6bc509ad9fb545387f665a3a3c0 [file] [log] [blame]
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
var log;
function watcher(id, old, newval) { log += 'watcher'; return newval; }
var o = { set x(v) { log += 'setter'; } };
o.watch('x', watcher);
Object.defineProperty(o, 'x', {value: 3, writable: true});
log = '';
o.x = 3;
assertEq(log, 'watcher');
reportCompare(0, 0, 'ok');