首页 文章

'Mi'不是带有dart2js的'IF'类型的子类型

提问于
浏览
0

我今天面临dart2js的问题,dart2js没有任何错误就结束了,但是当我在浏览器(Chrome)上启动我的webapp时,控制台发送此错误"Uncaught type 'Mi' is not a subtype of type 'IF' "
但是当在Dartium上运行时,没有错误 . 我'm not really into JavaScript, so i don't知道如何进一步调查 .

我的应用程序部署在那里:
5.231.68.247/comprachicos/index.html带有错误的页面是:
5.231.68.247/comprachicos/jeu.html

我的消息来源是Github:https://github.com/eagleofdeath13/Comprachicos/tree/master/web

提前致谢

1 回答

  • 0

    当我在Dartium中运行时,它确实会导致异常 .

    在你的jeu.html中你有

    <input id="nextPageButton" type="button"/>
    

    在你的main.dart中你有:

    ButtonElement b = querySelector("#nextPageButton");
    

    因此Dart中的错误消息是:

    Exception: type 'InputElement' is not a subtype of type 'ButtonElement' of 'b'.
    

    在您的html中使用 button -tag或在 main.dart 中使用 InputElement 来解决此问题 .

相关问题