title: Cordova Plugin inappbrowser : How use Cordova in Cordova Webview?
body: <ol>
  <li>I installed the plugin: In App Browser
  <a href="https://ionicframework.com/docs/native/in-app-browser" rel="nofollow noreferrer">https://ionicframework.com/docs/native/in-app-browser</a></li>
  </ol>
  
  <p>Documentation is here:
  <a href="https://github.com/apache/cordova-plugin-inappbrowser" rel="nofollow noreferrer">https://github.com/apache/cordova-plugin-inappbrowser</a></p>
  
  <ol start="2">
  <li><p>Dynamically, I created an HTML page in this directory: this.file.dataDirectory</p></li>
  <li><p>I try to load this page on the webview like this:</p></li>
  </ol>
  
  <p><strong>IMPORT</strong></p>
  
  <pre><code>import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
  </code></pre>
  
  <p><strong>CONSTRUCTOR</strong></p>
  
  <pre><code>constructor(private iab: InAppBrowser) {}
  </code></pre>
  
  <p><strong>MY CODE</strong></p>
  
  <pre><code>const browser = this.iab.create( this.webview.convertFileSrc( this.file.dataDirectory + 'jojo/index.html' ) );
  </code></pre>
  
  <p>Everything is ok and there aren't problems.
  My page jojo/index.html can load. </p>
  
  <p><strong>The page is load in the Cordova WebView</strong></p>
  
  <p>If I don't mistake, 
  because I don't set the "target" value (the value is still "_self")
  my page jojo/index.html is load in the Cordova WebView. Right ?</p>
  
  <p>Reference:</p>
  
  <p><a href="https://i.stack.imgur.com/Sp77i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sp77i.png" alt="enter image description here"></a></p>
  
  <p>So ... on my page, I want to use ionic functions (or cordova functions).</p>
  
  <p>How can I do that ?</p>
  
  <p>PS: I already check this topic: <a href="https://stackoverflow.com/questions/30622959/using-cordova-plugins-in-inappbrowser">Using cordova plugins in InAppBrowser</a> and it's a different case. Their target are "_blank", so them pages are open in the InAppBrowser.</p>
  
  <p><strong>My config</strong></p>
  
  <p>This is my configuration:</p>
  
  <pre><code>Ionic:
  
     ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
     Ionic Framework               : @ionic/angular 4.4.2
     @angular-devkit/build-angular : 0.13.9
     @angular-devkit/schematics    : 7.3.9
     @angular/cli                  : 7.3.9
     @ionic/angular-toolkit        : 1.5.1
  
  Cordova:
  
     cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
     Cordova Platforms     : android 7.1.4, ios 4.5.5
     Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 11 other plugins)
  
  System:
  
     Android SDK Tools : 26.1.1 (/Users/jojo/Library/Android/sdk)
     ios-deploy        : 2.0.0
     NodeJS            : v11.10.0 (/usr/local/bin/node)
     npm               : 6.9.0
     OS                : macOS Mojave
     Xcode             : Xcode 10.2.1 Build version 10E1001
  </code></pre>
  
  <p>Thank you so much for your help.</p>