2.2.0 Html使用img标签解析错误

TypeError: Illegal constructor
preload.js:55
at Function.getInstance (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.core.js:11687:24)
 
at Function.getInstance (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1213:39)
 
at Function._parseXML (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1270:38)
 
at Function._parseXML (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1228:31)
 
at Function.parse (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1222:23)
 
at HTMLDivParser.appendHTML (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1140:29)
 
at HTMLDivParser.set innerHTML [as innerHTML] (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1125:18)
 
at HTMLDivElement.set innerHTML [as innerHTML] (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1399:37)
 
at TestHtml.onAwake (file:///D:/LayaTest/TestHtml2.2.0/bin/js/bundle.js:27:34)
 
at TestHtml._activeHierarchy (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.core.js:12332:22)
已邀请:

xin

赞同来自:

这个问题我也遇到过,是Laya命名冲突了,2.3解决
或者你执行下:
Laya.ClassUtils.regClass('img', Laya.HTMLImageElement);

133*****831

赞同来自:

还有一个好方法2.3.0beta版本html.js库文件已修复的问题,把2.3.0beta的html.js库文件替换下就好了

要回复问题请先

商务合作
商务合作