Software Archive
Read-only legacy content
17061 Discussions

JavaScript Windows.open or windows.location not working with Cordova CLI 5.4.1

frudas_d_
Beginner
430 Views

Dear Intel Developer,

this Code is not working with  Cordova CLI 5.4.1, is working wih Cordiva CLI 5.1.1

function redirect() {

    $(document).ready(function(){
       
       window.open("http://myurl.com","_self");
       //window.location = "http://myurl.com/";
    });
}

 

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
430 Views

This is likely due to improper setting of the whitelist and CSP rules. See the "Audio Player App" for an example of proper setting of those values, and follow the (i) links on the whitelist settings section of the build settings for additional articles.

0 Kudos
Reply