修复bug

This commit is contained in:
zcj 2024-08-17 22:35:57 +08:00
parent ba6569f4cd
commit 2ceee01ca8
2 changed files with 4 additions and 2 deletions

View File

@ -69,7 +69,7 @@ cbb_wf会存放一些全局使用的函数, 例如Document_createElement、Node_
- node暂时就编译了windows版本, 其他版本未编译...
- 2024-08-17 修复了构造函数名称和原型对象名称不一致导致没挂上原型对象的bug
- 2024-08-17 修复了构造函数名称和原型对象名称不一致导致没挂上原型对象的bug, main.js也需要更新一下.
# 推广

View File

@ -128,7 +128,9 @@ global.ctr = {};
for (let c of func) {
this[c] = function () { }
}
this.Audio.prototype = this.HTMLAudioElement.prototype;
this.Image.prototype = this.HTMLImageElement.prototype;
this.Option.prototype = this.HTMLOptionElement.prototype;
this.XMLHttpRequestUpload.__proto__ = this.XMLHttpRequestEventTarget;
this.XMLHttpRequestUpload.prototype.__proto__ = this.XMLHttpRequestEventTarget.prototype; this.XMLHttpRequestEventTarget.__proto__ = this.EventTarget;
this.XMLHttpRequestEventTarget.prototype.__proto__ = this.EventTarget.prototype; this.XMLHttpRequest.__proto__ = this.XMLHttpRequestEventTarget;