JavaScript错误:Cordova + Windows Phone Universal + es2015垫片

时间:2015-10-21 10:04:06

标签: cordova visual-studio-cordova

当我在Cordova 5.3.3 + Windows Phone Universal项目中使用es2015(es6)垫片时,我正在考虑JavaScript runtime error

运行es6-shim.js

时出错
SCRIPT5007: Unhandled exception at line 221, column 7 in ms-appx-web://test/www/scripts/lib/es6-shim/es6-shim.js 
0x800a138f - JavaScript runtime error: Unable to get property 'toString' of undefined or null reference
es6-shim.js (221,7)

我使用以下代码进行测试: es-shim v0.33.6,Cordova 5.3.3,Visual Studio Community

<!DOCTYPE html>
<html>
<head>
    <script src="scripts/es6-shim/es6-shim.js"></script>
</head>
<body>
    <p>Hello, your application is ready!</p>

</body>
</html>

注意:

  • es6-shim和core.js都有运行时错误。
  • 使用Visual Studio 2015社区进行IDE和构建。
  • 只有Windows Phone Universal才会出现此问题。
  • 我联系了es6-shim的创建者,他认为Cordova是个问题。更多信息:https://github.com/paulmillr/es6-shim/issues/364

0 个答案:

没有答案