cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergei (JIRA)" <>
Subject [jira] [Commented] (CB-10946) dynamically load JS/CSS file into index.html doesn't work with cordova-ios 4.0
Date Wed, 27 Feb 2019 09:10:00 GMT


Sergei commented on CB-10946:

I don't have CSP enabled in my app (because I connect to different dynamic servers).

I can confirm. Dynamically added links to css files won't work.



> dynamically load JS/CSS file into index.html doesn't work with cordova-ios 4.0
> ------------------------------------------------------------------------------
>                 Key: CB-10946
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Ionic
>    Affects Versions: 6.0.0
>         Environment: Ionic 1.7.14, Cordova 6.0.0, iOS devices
>            Reporter: Raven Zuo
>            Priority: Major
> I use a plugin called cordova-app-loader to update our app from resource server so that
if we only change JS/html/css files, we don't need submit to apple for review. It works perfectly
before with old Cordova which generate iOS3.9.2 build. After upgrading Cordova to 6.0.0, the
generated iOS version is now 4.0.1 and it doesn't work anymore. 
> I checked into the issue and found that even I remove the updating from resource server
part, only load the js files to index.html dynamically, the app will freeze after load all
the js files.
> Details of my current process: 
> # In my index.html file's head, there is some lib js files like cordova.js etc. Among
them, the last js file is my bootstrap.js
> # the bootstrap.js file will read a manifest.json file(which include file paths need
to be add to index.html dynamically) and get all the js files need be loaded.
> # Add all these files into index.html with the following code:
> {code}
>       var el,
>       head = document.getElementsByTagName('head')[0],
>       src = the_path_to_the_js_file,
>       now =;
>       el= document.createElement('script');
>       el.type= 'text/javascript';
>       el.src= src + '?' + now;
>       el.async = false;
>       head.appendChild(el);
> {code}
> # I added a log message into the last js file which will be dynamically loaded and in
the console window, I saw this message which means the js files are all loaded.
> But then after that, the app just freezes forever.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message