mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
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:
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();
|
||||
*
|
||||
* ```
|
||||
|
Loading…
Reference in New Issue
Block a user