6.7.0 - Alpha6 - Fine tuning

This commit is contained in:
SuperMonster003
2025-10-01 00:13:00 +08:00
parent 4fe314d301
commit f3e04b9ca2
165 changed files with 2356 additions and 2413 deletions

View File

@@ -1,33 +1,35 @@
(function(){
let {setReadonlyAttribute} = require("modules/axios/browser-libs/utils.js");
(function () {
let { setReadonlyAttribute } = require('modules/axios/browser-libs/utils.js');
let Event = function(type) {
setReadonlyAttribute(this, 'bubbles', false);
setReadonlyAttribute(this, 'eventPhase', 0);
//是否可取消
setReadonlyAttribute(this, 'cancelable', false)
this.cancelBubble = false;
setReadonlyAttribute(this, 'defaultPrevented', false)
//节点
setReadonlyAttribute(this, 'target', null)
setReadonlyAttribute(this, 'currentTarget', null)
setReadonlyAttribute(this, 'type', type)
//时间截
Object.defineProperty(this, 'timeStamp', {
get: function() {
return Date.now() - Event._loadTimeStamp;
}
})
setReadonlyAttribute(this, 'isTrusted', false)
}
Event.prototype[Symbol.toStringTag] = 'Event';
Event._loadTimeStamp = Date.now();
Event.prototype.preventDefault = function() {}
Event.prototype.stopPropagation = function() {}
Event.prototype.stopImmediatePropagation = function() {
let Event = function (type) {
setReadonlyAttribute(this, 'bubbles', false);
setReadonlyAttribute(this, 'eventPhase', 0);
// 是否可取消
setReadonlyAttribute(this, 'cancelable', false);
this.cancelBubble = false;
setReadonlyAttribute(this, 'defaultPrevented', false);
// 节点
setReadonlyAttribute(this, 'target', null);
setReadonlyAttribute(this, 'currentTarget', null);
setReadonlyAttribute(this, 'type', type);
// 时间截
Object.defineProperty(this, 'timeStamp', {
get: function () {
return Date.now() - Event._loadTimeStamp;
},
});
setReadonlyAttribute(this, 'isTrusted', false);
};
Event.prototype[Symbol.toStringTag] = 'Event';
Event._loadTimeStamp = Date.now();
Event.prototype.preventDefault = function () {
};
Event.prototype.stopPropagation = function () {
};
Event.prototype.stopImmediatePropagation = function () {
}
};
module.exports = Event
})()
module.exports = Event;
})();