cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julio cesar sanchez <jcesarmob...@gmail.com>
Subject InAppBrowser insertCSS/executeScript with file option code example is confusing
Date Mon, 03 Nov 2014 13:46:42 GMT
Looking into the inAppBrowser code, it seems to me that the insertCSS and
executeScript are for injecting an external CSS or JS, but looking at the
code example, it seems (to me), that an internal file could be loaded

insertCSS example code:

var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
    ref.insertCSS({file: "mystyles.css"});
});

executeScript example code:

var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
    ref.executeScript({file: "myscript.js"});
});


So, can anybody confirm if this two functions are only for external
files? or is it possible to load files from www folder?

If only external files are possible, then maybe we should change the
example codes to something like

var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
    ref.insertCSS({file: "http://www.example.com/mystyles.css"});
});

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message