npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cap-overlay-webview

v0.4.18

Published

Capacitor webview plugin

Readme

cap-overlay-webview

The plugin is for Capacitor 6

Capacitor webview plugin. Overlays webview above the app. Allows displaying multiple webviews, show/hide/remove them, set their sizes and control some of their functions

Install

npm install cap-overlay-webview
npx cap sync

API

addWebView(...)

addWebView(options: AddWebViewOptions) => Promise<{ message: string; }>

Add a new WebView with a given ID and URL.

| Param | Type | Description | | ------------- | --------------------------------------------------------------- | -------------------------------- | | options | AddWebViewOptions | - WebView configuration options. |

Returns: Promise<{ message: string; }>


showWebView(...)

showWebView(options: WebViewIdOptions) => Promise<{ message: string; }>

Show a WebView by its ID.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


hideWebView(...)

hideWebView(options: WebViewIdOptions) => Promise<{ message: string; }>

Hide a WebView by its ID.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


removeWebView(...)

removeWebView(options: WebViewIdOptions) => Promise<{ message: string; }>

Remove a WebView by its ID.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


setWebViewSize(...)

setWebViewSize(options: SetWebViewSizeOptions) => Promise<{ message: string; }>

Set the WebView size, adjusting top and bottom insets.

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------- | ----------------------------- | | options | SetWebViewSizeOptions | - WebView ID and size insets. |

Returns: Promise<{ message: string; }>


canGoBack(...)

canGoBack(options: WebViewIdOptions) => Promise<{ canGoBack: boolean; }>

Check if a WebView can go back in history.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ canGoBack: boolean; }>


canGoForward(...)

canGoForward(options: WebViewIdOptions) => Promise<{ canGoForward: boolean; }>

Check if a WebView can go forward in history.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ canGoForward: boolean; }>


goBack(...)

goBack(options: WebViewIdOptions) => Promise<{ message: string; }>

Navigate back in a WebView.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


goForward(...)

goForward(options: WebViewIdOptions) => Promise<{ message: string; }>

Navigate forward in a WebView.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


reload(...)

reload(options: WebViewIdOptions) => Promise<{ message: string; }>

Reload the WebView.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ message: string; }>


captureScreenshot(...)

captureScreenshot(options: WebViewIdOptions) => Promise<{ screenshot: string; }>

Capture a screenshot of the WebView.

| Param | Type | Description | | ------------- | ------------------------------------------------------------- | ------------- | | options | WebViewIdOptions | - WebView ID. |

Returns: Promise<{ screenshot: string; }>


openUrl(...)

openUrl(options: OpenUrlOptions) => Promise<void>

Open a URL using the system (e.g. Safari or external app). Gives user a system selector if there are multiple apps to choose from.

| Param | Type | Description | | ------------- | --------------------------------------------------------- | -------------- | | options | OpenUrlOptions | - URL to open. |


addListener(WebViewEvent, ...)

addListener(event: WebViewEvent, listener: (data: WebViewEventData) => void) => Promise<PluginListenerHandle>

Listen for WebView load events.

| Param | Type | Description | | -------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | event | WebViewEvent | - "webViewLoaded", "webViewFailedToLoad", or "webViewUrlChange". | | listener | (data: WebViewEventData) => void | - Callback function. |

Returns: Promise<PluginListenerHandle>


removeListener(...)

removeListener(event: WebViewEvent, listener: (data: WebViewEventData) => void) => Promise<void>

Remove a listener for WebView events.

| Param | Type | Description | | -------------- | -------------------------------------------------------------------------------- | ------------------------------ | | event | WebViewEvent | - Event name. | | listener | (data: WebViewEventData) => void | - Callback function reference. |


bringMainWebViewToFront()

bringMainWebViewToFront() => Promise<void>

Cover the overlay webview with the app webview.


sendMainWebViewToBack()

sendMainWebViewToBack() => Promise<void>

Cover the main webview with the overlay webview.


executeJavaScript(...)

executeJavaScript(options: ExecuteJavaScriptOptions) => Promise<{ result: any; }>

Execute JavaScript in a WebView.

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------------- | ------------------------------- | | options | ExecuteJavaScriptOptions | - JavaScript execution options. |

Returns: Promise<{ result: any; }>


Interfaces

AddWebViewOptions

Options for adding a WebView.

| Prop | Type | | ----------------- | -------------------- | | id | string | | hidden | boolean | | transparent | boolean | | alwaysOnTop | boolean | | url | string | | js | string |

WebViewIdOptions

Options for specifying a WebView by ID.

| Prop | Type | | -------- | ------------------- | | id | string |

SetWebViewSizeOptions

Options for setting WebView size with insets.

| Prop | Type | | ----------------- | ------------------- | | id | string | | topInset | number | | bottomInset | number | | height | number |

OpenUrlOptions

Options for opening a URL with another app.

| Prop | Type | | --------- | ------------------- | | url | string |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

WebViewEventData

Event data structure for WebView events.

| Prop | Type | | ------------- | ------------------- | | id | string | | message | string | | error | string | | url | string | | newUrl | string | | title | string |

ExecuteJavaScriptOptions

| Prop | Type | | -------- | ------------------- | | id | string | | js | string |

Type Aliases

WebViewEvent

Possible WebView events.

"webViewMessage" | "webViewLoaded" | "webViewFailedToLoad" | "webViewUrlChange"