You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/19 20:56:56 UTC

[GitHub] [cordova] nomaam opened a new issue #211: inAppBrowser executeScript File Does Not Work with Local File

nomaam opened a new issue #211: inAppBrowser executeScript File Does Not Work with Local File
URL: https://github.com/apache/cordova/issues/211
 
 
   # Bug Report
   
       // none of these file paths work
       var toInject = cordova.file.applicationDirectory + "www/js/inject.js";
       //var toInject = "www/js/inject.js";
       //var toInject = "js/inject.js";
       //var toInject = "inject.js";
   
       inAppBrowserRef.executeScript(
       {
           file: toInject
           //code:
           //  "alert('inline injected');"  // inline code works as expected
       },
           function () {
               alert("inject finished");
           } 
       );
   
   ## Problem
   
   Trying to use inAppBrowser and inject JS from a file that is stored in the www folder. Doesn't work, no error messages given. Inline code injection works, but is very sloppy to use if you have any decent length of code. 
   
   ### What is expected to happen?
   
   Load the JS file
   
   ### What does actually happen?
   
   Nothing, no error. 
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   Newest version of everything
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   Code posted above
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Android
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   Newest version of everything
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x ] I searched for existing GitHub issues
   - [x ] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org