@twogate/capacitor-modal-webview
v6.0.1
Published
capacitor plugin modal webview
Downloads
4
Readme
@twogate/capacitor-modal-webview
modal webview
Install
npm install @twogate/capacitor-modal-webview
npx cap sync
API
open(...)
open(options: { options: ModalWebViewOptions; }) => Promise<boolean>
| Param | Type |
| ------------- | --------------------------------------------------------------------------------- |
| options
| { options: ModalWebViewOptions; } |
Returns: Promise<boolean>
Interfaces
ModalWebViewOptions
| Prop | Type | Description |
| ----------------------------- | -------------------- | ------------------------------------------------------------------------------------------- |
| url
| string | |
| loadWebPageErrorMessage
| string | |
| enableCookie
| boolean | If true, cookie in the webview will be stored even if you kill application. |
| pathToFlushCookie
| string | only Android. Path, cookie in the webview will be removed when webview load this path page. |
Theme
You can set some colors in toolbar, navigation bar and modal view background.
iOS
Add Color Set to your Assets.xcassets
| ColorSet | Description |
| ----------------------------- | --------------------------------------------------------------------------------- |
| ToolBarBackground
| Background color, modal navigation bar and toolbar. |
| ToolBarForeground
| Item color of toolbar and navigation bar |
| BaseBackground
| Background color of modal. |
Android
Add <color>
tag to your styles.xml
| name | Description |
| --------------------------------------------------- | --------------------------------------------------------------------------------- |
| colorModalWebViewToolBarForegroundColor
| Background color, modal navigation bar and toolbar. |
| colorModalWebViewToolBarBackgroundColor
| Item color of toolbar and navigation bar |
| colorModalWebViewBaseBackgroundColor
| Background color of modal. |