diff --git a/README.md b/README.md index 97970bc..132f351 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ cbb_wf会存放一些全局使用的函数, 例如Document_createElement、Node_ - node暂时就编译了windows版本, 其他版本未编译... -- 2024-08-17 修复了构造函数名称和原型对象名称不一致导致没挂上原型对象的bug +- 2024-08-17 修复了构造函数名称和原型对象名称不一致导致没挂上原型对象的bug, main.js也需要更新一下. # 推广 diff --git a/main.js b/main.js index c3eba0a..6c2f552 100644 --- a/main.js +++ b/main.js @@ -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;