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 2019/10/28 15:56:32 UTC

[GitHub] [cordova-plugin-inappbrowser] benvallack opened a new issue #561: Beforeload not working with TypeScript

benvallack opened a new issue #561: Beforeload not working with TypeScript
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/561
 
 
   # Bug Report
   
   Using the plugin with Ioinic 4 using TypeScript, the beforeload second callback doesn't seem to work. The initial event is fired but then the link is never loaded because the second callback isn't fired. 
   
   Paid help required! We're happy to pay for help to get this issue resolved if it is a bug, or even just to help us get it working if we're using it incorrectly etc. The documentation doesn't seem to show how to use this with TypeScript syntax so we're at a bit of a loss. Any help much appreciated. 
   
   ### What is expected to happen?
   
   The second callback inside the beforeload event callback should be able to be fired to complete the link loading after some logic is performed within the main event callback function. 
   
   ### What does actually happen?
   
   An error is shown when building. If ts-ignore is used, an error shows in the JS console instead. 
   
   
   ### Command or Code
   `
   browser.on("beforeload").subscribe( (ev: InAppBrowserEvent, callback: (url: string) =>string ) => { 
   console.log('before load fired'); 
   // This function is fired as expected.
   console.log(value.url); 
   // The following callback function shows an undefined error if ts-ignore is used, otherwise it fails to build. 
   callback(value.url);
    }
   ,err=>{} 
   );
   `
   
   ### Environment, Platform, Device
   All.
   
   ### Version information
   ionic/angular 4.6.2
   
   ## 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