insertCSS example update

The current example in the docs is incomplete and thus quite useless. Just on its own won't manipulate the CSS of a loaded page. It requires the InAppBrowserEvent, and using it in the callback.
This commit is contained in:
Attila Vago
2018-02-25 23:12:16 +00:00
committed by GitHub
parent 954bd876de
commit 8b829101ff
@@ -155,7 +155,7 @@ export class InAppBrowserObject {
* @description Launches in app Browser
* @usage
* ```typescript
* import { InAppBrowser } from '@ionic-native/in-app-browser';
* import { InAppBrowser, InAppBrowserEvent } from '@ionic-native/in-app-browser';
*
* constructor(private iab: InAppBrowser) { }
*
@@ -166,7 +166,12 @@ export class InAppBrowserObject {
* const browser = this.iab.create('https://ionicframework.com/');
*
* browser.executeScript(...);
*
* browser.insertCSS(...);
* browser.on('loadstop').subscribe((event: InAppBrowserEvent) => {
* browser.insertCSS({ code: "body{color: red;" });
* });
*
* browser.close();
*
* ```