我正在使用 Javascript 编写一个 Windows 8 应用程序。我在使用 Windows 8 模拟器测试我的应用程序时遇到了这个问题。这似乎是 ui.js 的一个错误。
Exception was thrown but not handled in user code at line 22600, column 25 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js
0x800a138f - JavaScript runtime error: Unable to get property 'style' of undefined or null reference
If there is a handler for this exception, the program may be safely cont
它指向这条线。
that._viewport.style.opacity = 1.0;
控制台日志
SCRIPT5007: Exception was thrown but not handled in user code at line 22600, column 25 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js
0x800a138f - JavaScript runtime error: Unable to get property 'style' of undefined or null reference
File: ui.js, line: 22600 column: 25
更新: 今天 2012/08/09。当我运行我的应用程序时,它会在 jquery.js 和 ui.js 中生成另一个奇怪的错误。他们怎么了???
'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/1.0)'.
Exception was thrown at line 5200, column 4 in ms-appx://7034140f-baab-4c76-b27c-2a4c76641550/js/jquery.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 28908, column 30 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js
0x80004005 - JavaScript runtime error: Incorrect function.