Capacitor plugin to create floating Webviews.
npm install capacitor-plugin-floatingweb
npx cap sync
open(...)
close()
loadUrl(...)
goBack()
goForward()
reload()
show()
hide()
updateDimensions(...)
addListener(keyof EventListenerMap, ...)
removeAllListeners()
- Interfaces
- Type Aliases
open(options: OpenOptions) => Promise<void>
Open a webview with the given URL.
Param | Type |
---|---|
options |
OpenOptions |
close() => Promise<void>
Close an open webview.
loadUrl(options: { url: string; }) => Promise<void>
Load a url in the webview.
Param | Type |
---|---|
options |
{ url: string; } |
goBack() => Promise<void>
goForward() => Promise<void>
reload() => Promise<void>
show() => Promise<void>
hide() => Promise<void>
updateDimensions(options: Dimensions) => Promise<void>
Param | Type |
---|---|
options |
Dimensions |
addListener(eventName: EventName, listener: PageloadListener | ProgressListener | NavigateListener) => PluginListenerHandle
Param | Type |
---|---|
eventName |
keyof EventListenerMap |
listener |
PageloadListener | ProgressListener | NavigateListener |
Returns: PluginListenerHandle
removeAllListeners() => Promise<void>
Prop | Type |
---|---|
url |
string |
element |
HTMLElement |
userAgent |
string |
wideViewport |
boolean |
Prop | Type |
---|---|
width |
number |
height |
number |
x |
number |
y |
number |
scale |
number |
Prop | Type |
---|---|
remove |
() => Promise<void> |
keyof EventListenerMap
{ pageLoad: PageloadListener; progress: ProgressListener; navigate: NavigateListener; }
(): void
(event: { value: number; }): void
(event: { url: string; newWindow: boolean; sameHost: boolean; }): void