zy-补环境框架-实现-window补环境

This commit is contained in:
aiyingfeng 2023-08-12 15:05:57 +08:00
parent cfed78a606
commit 7a25f17ecb

View File

@ -0,0 +1,23 @@
const HtmlDivElement =function HtmlDivElement()
{
throw new TypeError('Illegal constructor')
}
catvm.safefunction(HtmlDivElement);
Object.defineProperties(HtmlDivElement.prototype,{
[Symbol.toStringTag]:{
value:'HtmlDivElement',
configurable:true,
}
})
//htmlDivElement = catvm.proxy(htmlDivElement)
catvm.memory.htmlElements['div'] = function(){
const div = new (function(){})
div.align = ''
div.__proto__ = HtmlDivElement.prototype
return div
}