简体   繁体   English

未捕获的ReferenceError:wlInitOptions未定义

[英]Uncaught ReferenceError: wlInitOptions is not defined

I'm getting this error since i upgraded my worklight developer edition to v5.0.6: 自从我将worklight开发人员版本升级到v5.0.6以来,我收到此错误:

wlclient init started worklight.js:1118
Uncaught ReferenceError: wlInitOptions is not defined

Look inside your application's js folder (yourProject\\apps\\yourApp\\common\\js). 查看应用程序的js文件夹(yourProject \\ apps \\ yourApp \\ common \\ js)。 Make sure it contains an initOptions.js file and that its content is as follows (you can also create a new application and copy the file from there): 确保它包含一个initOptions.js文件,并且其内容如下(您也可以创建一个新的应用程序并从此处复制该文件):

var wlInitOptions = {

    // # Should application automatically attempt to connect to Worklight Server on application start up
    // # The default value is true, we are overriding it to false here.
    connectOnStartup : false
};

if (window.addEventListener) {
    window.addEventListener('load', function() { WL.Client.init(wlInitOptions); }, false);
} else if (window.attachEvent) {
    window.attachEvent('onload',  function() { WL.Client.init(wlInitOptions); });

In addition, the HTML file must not contain a call to WL.Client.init in the <body> tag. 此外,HTML文件不得在<body>标记中包含对WL.Client.init的调用。 It should look like this: 它看起来应该像这样:

<body id="content" style="display: none;">

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的ReferenceError:在MobileFirst Migrated应用程序中未定义WL - Uncaught ReferenceError: WL is not defined in MobileFirst Migrated app 在setTimeOut函数中传递多个参数会引发Uncaught ReferenceError:方法未定义(匿名函数)? - Multiple Parameter passing in setTimeOut function throws Uncaught ReferenceError: method is not defined (anonymous function)? IBM Worklight / Zxing-未捕获的ReferenceError:require未定义barcodescanner.js:10 - IBM Worklight / Zxing- Uncaught ReferenceError: require is not defined barcodescanner.js:10 ReferenceError:在MobileFirst中未定义cordova - ReferenceError: cordova is not defined in MobileFirst ReferenceError:WL未定义 - ReferenceError: WL is not defined ReferenceError:调用SQL Adapter Procedure时未定义结果 - ReferenceError: result is not defined on invoking SQL Adapter Procedure Mobilefirst 7.1 wlInitOptions使用WL.Client.Init返回未定义 - Mobilefirst 7.1 wlInitOptions return undefined with WL.Client.Init 获取ReferenceError:使用MobileFirst EnablePushNotification时未定义IBMBluemix - Getting ReferenceError: IBMBluemix is not defined when using MobileFirst EnablePushNotification 离子IBM MobileFirst Platform 8.0 sqladapter ReferenceError:未定义WL - ionic IBM MobileFirst platform 8.0 sqladapter ReferenceError: WL is not defined IBM MobileFirst 7.0 - 未捕获的ReferenceErrors:未定义WLJQ,未定义WL - IBM MobileFirst 7.0 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM