boda_jsEnv/env_xbb_lastest_bo/env/BeforeUnloadEvent.js
xuxiaobo-bobo 24cbc7a3fa '0711'
2023-07-11 15:19:33 +08:00

33 lines
1.1 KiB
JavaScript

// BeforeUnloadEvent对象
BeforeUnloadEvent = function BeforeUnloadEvent() {
let arg = arguments[0];
if (arg != 'bobo' && (this instanceof BeforeUnloadEvent)) {
return bodavm.toolsFunc.throwError("TypeError", "Illegal constructor");
}
;
bodavm.toolsFunc.symbolProperty(this);
if (arg != 'bobo') {
console.log_copy('BeforeUnloadEvent 实例化对象 --->', JSON.stringify_bo(arguments, function (k, v) {
if (v == window) {
return 'window';
} else {
return v;
}
}));
}
;
};
bodavm.toolsFunc.safeProto(BeforeUnloadEvent, "BeforeUnloadEvent");
BeforeUnloadEvent.prototype.__proto__ = Event.prototype;
BeforeUnloadEvent.__proto__ = Event;
bodavm.toolsFunc.defineProperty(BeforeUnloadEvent.prototype, "returnValue", {
configurable: true,
enumerable: true,
get: function returnValue() {
return bodavm.toolsFunc.dispatch(this, BeforeUnloadEvent.prototype, "BeforeUnloadEvent", "returnValue_get", arguments);
},
set: function returnValue() {
return bodavm.toolsFunc.dispatch(this, BeforeUnloadEvent.prototype, "BeforeUnloadEvent", "returnValue_set", arguments);
}
});