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

@artn0nymous/capacitor-webview

v1.0.7

Published

A custom capacitor webview plugin.

Readme

Capacitor Custom Webview Plugin

A Capacitor plugin to open a custom native WebView with navigation controls, file upload, download support, and network monitoring for both Android and iOS.


Features

  • Open a native WebView from your Capacitor/Ionic app
  • Navigation controls: Back, Forward, Reload, Close
  • File upload (camera, gallery, files)
  • File download (with download manager on Android, QuickLook on iOS)
  • Network request monitoring (XHR/fetch logs)
  • Fullscreen modal presentation

Installation

npm install @artn0nymous/capacitor-webview
npx cap sync

Usage

import { CustomWebview } from '@artn0nymous/capacitor-webview';

// Open a webview with a given URL
CustomWebview.openWebview({
  url: 'https://www.example.com',
  debug: true // Optional: enables native network and event logging for debugging
});

Android Setup

1. Declare Permissions (Optional)

Only add the permissions you actually need.
For example, if your web content does not use the camera, microphone, or file upload, you do not need to declare those permissions.

Add the following permissions to your app's android/app/src/main/AndroidManifest.xml only if your use case requires them:

<!-- Required for all web content -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Only if you use file upload or camera/microphone in your webview -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Note:
If you target Android 13+ (API 33+), you may need to request permissions at runtime for file/camera/microphone access.

2. Activity Declaration

If not already present, ensure the following activity is declared in your AndroidManifest.xml:

<activity
    android:name="com.webview.capacitor.custom.CustomWebViewActivity"
    android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar" />

iOS Setup

1. Declare Permissions (Optional)

Only add the Info.plist keys you actually need.
For example, if your web content does not use the camera, microphone, or file upload, you do not need to declare those keys.

Add the following keys to your app's ios/App/App/Info.plist only if your use case requires them:

<!-- Required only if your webview uses camera -->
<key>NSCameraUsageDescription</key>
<string>Camera access is required for file uploads and video calls.</string>
<!-- Required only if your webview uses microphone -->
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for video calls.</string>
<!-- Required only if your webview uses photo library/file upload -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo library access is required for file uploads.</string>

Permissions Summary

| Feature | Android Permission(s) | iOS Info.plist Key(s) | |-----------------|---------------------------------------------|----------------------------------------| | WebView | INTERNET | (none) | | File Upload | CAMERA, RECORD_AUDIO, READ/WRITE_EXTERNAL | NSCameraUsageDescription, NSPhotoLibraryUsageDescription | | File Download | READ/WRITE_EXTERNAL_STORAGE | (none, handled by QuickLook) | | Microphone | RECORD_AUDIO | NSMicrophoneUsageDescription |

Only add the permissions relevant to your app's needs.


Example

CustomWebview.openWebview({
  url: 'https://your-site.com'
});

Notes

  • The plugin opens a fullscreen modal WebView with navigation controls.
  • Downloads on Android are saved to the public Downloads folder; on iOS, PDFs/images are previewed in-app.

API

openWebview(options: { url: string, debug?: boolean }): Promise<void>

Opens a native WebView with the specified URL.

  • url (string, required): The URL to load.
  • debug (boolean, optional): If true, enables native logging of network requests and events (useful for debugging).

Example

await CustomWebview.openWebview({ url: 'https://www.example.com', debug: true });

License

MIT