boda_jsEnv/env_xbb_lastest_jsdom/env/HTMLAudioElement.js
xuxiaobo-bobo cf8d06554d '0220'
2023-02-21 00:49:29 +08:00

13 lines
738 B
JavaScript

// HTMLAudioElement对象
bodavm.memory.globalobj['HTMLAudioElement'] = function HTMLAudioElement(){
if (!(this instanceof HTMLAudioElement)) {
return bodavm.toolsFunc.throwError("TypeError", "Failed to construct 'HTMLAudioElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function")
};
return bodavm.toolsFunc.throwError("TypeError", "Illegal constructor")
}
bodavm.toolsFunc.safeProto(bodavm.memory.globalobj['HTMLAudioElement'], "HTMLAudioElement");
bodavm.memory.globalobj['HTMLAudioElement'].prototype.__proto__=bodavm.memory.globalobj['HTMLMediaElement'].prototype;
bodavm.memory.globalobj['HTMLAudioElement'].__proto__=bodavm.memory.globalobj['HTMLMediaElement'];