From 2ceee01ca8830e296a2815d93d7ba5efb7475322 Mon Sep 17 00:00:00 2001 From: zcj <1491025307@qq.com> Date: Sat, 17 Aug 2024 22:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- main.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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;