capacitor-webview-controller
TypeScript icon, indicating that this package has built-in type declarations

0.0.13 • Public • Published

capacitor-webview-controller

control webviews cross platform using capacitor.js.

Install

npm install capacitor-webview-controller
npx cap sync

API

loadURL(...)

loadURL(options: { url: string; }) => Promise<void>
Param Type
options { url: string; }

closeWindow()

closeWindow() => Promise<void>

evaluateJavaScript(...)

evaluateJavaScript(options: { javascript: string; }) => Promise<{ result: string; }>
Param Type
options { javascript: string; }

Returns: Promise<{ result: string; }>


show()

show() => Promise<void>

hide()

hide() => Promise<void>

addListener('navigation', ...)

addListener(event: "navigation", listener: (args: PageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
event 'navigation'
listener (args: PageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('page loaded', ...)

addListener(event: "page loaded", listener: (args: PageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
event 'page loaded'
listener (args: PageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('closed', ...)

addListener(event: "closed", listener: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
event 'closed'
listener () => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

PluginListenerHandle

Prop Type
remove () => Promise<void>

Type Aliases

PageEvent

{ url: string }

Package Sidebar

Install

npm i capacitor-webview-controller

Weekly Downloads

1

Version

0.0.13

License

MIT

Unpacked Size

62.1 kB

Total Files

25

Last publish

Collaborators

  • lqr471814