0x800a1391 - JavaScript runtime error: 'WinJS' is undefined

落花浮王杯 提交于 2019-12-11 04:04:49

问题


I have download the code from CodePlex Then I install the sdk's of live,telerik etc

After installation I ran the code and I'm getting the following error

   `0x800a1391 - JavaScript runtime error: 'WinJS' is undefined`

The error occured in the Converters.Js file here it is

(function() {
   var r = Windows.Storage.ApplicationData.current.roamingSettings.values;

    // Export shortDate
    WinJS.Namespace.define("codeSHOW.Converters", {  // Error Occured here

   });

})();

Any help is highly appreciated.

Thanks.


回答1:


Did you include base.js in your htm file before which ever file is making that call?




回答2:


On your default.htm page (or other html pages with the same code) change the WINJS References to the location of this in your app ie

References > Windows Library for JavaScript 2.0 > js > base.js

I had the same problem and just had to remove the .preview on the URL reference from

<!-- WinJS references -->
<link href="//Microsoft.WinJS.2.0.Preview/css/ui-dark.css" rel="stylesheet" />
<script src="//Microsoft.WinJS.2.0.Preview/js/base.js"></script>
<script src="//Microsoft.WinJS.2.0.Preview/js/ui.js"></script>

to

<!-- WinJS references -->
<link href="//Microsoft.WinJS.2.0/css/ui-dark.css" rel="stylesheet" />
<script src="//Microsoft.WinJS.2.0/js/base.js"></script>
<script src="//Microsoft.WinJS.2.0/js/ui.js"></script>



回答3:


You should add to References Windows Library for Javascript



来源:https://stackoverflow.com/questions/13468492/0x800a1391-javascript-runtime-error-winjs-is-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!