mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-22 07:47:27 +08:00
13 lines
738 B
JavaScript
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'];
|