Cap-go / capacitor-inappbrowser
Capacitor plugin in app browser with urlChangeEvent
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing Cap-go/capacitor-inappbrowser in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view@capgo/inappbrowser ➡️ Get Instant updates for your App with Capgo Missing a feature? We’ll build the plugin for you 💪 Capacitor plugin in app browser with urlChangeEvent, two way communication, camera and microphone usage, etc. Why InAppBrowser? The official Capacitor Browser plugin has strict security limitations that prevent advanced features. InAppBrowser removes these restrictions, enabling: • **Two-way communication** between your app and the browser • **JavaScript injection** for dynamic content manipulation • **Camera and microphone access** within the browser context • **URL change monitoring** for navigation tracking • **Custom toolbars and UI** for branded experiences • **Cookie and cache management** for session control • **Custom sizes** for extra control of the display position Perfect for OAuth flows, embedded web apps, video calls, and any scenario requiring deep integration with web content. Documentation The most complete doc is available here: https://capgo.app/docs/plugins/inappbrowser/ Compatibility | Plugin version | Capacitor compatibility | Maintained | | -------------- | ----------------------- | ---------- | | v8.\*.\* | v8.\*.\* | ✅ | | v7.\*.\* | v7.\*.\* | On demand | | v6.\*.\* | v6.\*.\* | ❌ | | v5.\*.\* | v5.\*.\* | ❌ | > **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained. Install Usage Customize Chrome Custom Tab Appearance (Android) The method launches a Chrome Custom Tab on Android. You can customize its appearance to blend with your app: All CCT options are Android-only and safely ignored on iOS. See for full documentation. Open WebView with Custom Dimensions By default, the webview opens in fullscreen. You can set custom dimensions to control the size and position: **Touch Passthrough**: When custom dimensions are set (not fullscreen), touches outside the webview bounds will pass through to the underlying Capacitor webview, allowing the user to interact with your app in the exposed areas. This enables picture-in-picture style experiences where the InAppBrowser floats above your content. Open WebView with Safe Margin To create a webView with a 20px bottom margin (safe margin area outside the browser): Web platform is not supported. Use instead. Open WebView in Full Screen Mode To open the webview in true full screen mode (content extends behind the status bar), set to : This option works independently of the toolbar type: • **iOS**: The webview extends behind the status bar, providing true edge-to-edge content • **Android**: The top margin is disabled, allowing content to fill the entire screen Perfect for immersive experiences like video players, games, or full-screen web applications. Can be combined with any setting. Test app and code: https://github.com/Cap-go/demo-app/blob/main/src/views/plugins/Web.vue Camera usage Android Add the following to your file: Then the permission will be asked when the camera is used. iOS Add the following to your file: Microphone usage Android Add the following to your file: Then the permission will be asked when the microphone is used. iOS Add the following to your file: Location usage Android Add the following to your file: Then the permission will be asked when location is requested by a website in the webview. iOS Add the following to your file: Two way communication With this plugin you can send events from the main app to the inappbrowser and vice versa. > The data is sent as a JSON object, so no functions or other non-JSON-serializable types are allowed. Main app to inappbrowser, detail object is mendatory Receive event from native in the inappbrowser Send event from inappbrowser to main app, detail object is mendatory Receive event from inappbrowser in the main app Close inappbrowser from inappbrowser itself Google Pay (Android) To enable Google Pay inside the in-app browser on Android you must do **all three** of the following: • Enable the option when opening the browser Pass in your call: • Add Payment Request intent queries to your Android 11+ enforces Package Visibility. Without these entries the WebView cannot discover Google Pay and the payment sheet will never appear. Add the following inside the tag of your app's (typically ): • Require WebView 120 or later The W3C Payment Request API (used by Google Pay) requires Android WebView 120+. Devices running an older WebView version will not be able to complete Google Pay transactions. Most modern Android devices already meet this requirement. API • • • • • • • • • • • • • • • • • • • • • • • • • • • Interfaces • Type Aliases • Enums goBack(...) Navigates back in the WebView's history if possible | Param | Type | | ------------- | ----------------------------- | | ** ** | { id?: string; } | **Returns:** Promise<{ canGoBack: boolean; }> **Since:** 7.21.0 -------------------- open(...) Open url in a new window fullscreen, on android it use chrome custom tabs, on ios it use SFSafariViewController | Param | Type | | ------------- | --------------------------------------------------- | | ** ** | OpenOptions | **Returns:** Promise<any> **Since:** 0.1.0 -------------------- clearCookies(...) Clear cookies of url When is omitted, applies to all open webviews. | Param | Type | | ------------- | ----------------------------------------------------------------- | | ** ** | ClearCookieOptions | **Returns:** Promise<any> **Since:** 0.5.0 -------------------- clearAllCookies(...) Clear all cookies When is omitted, applies to all open webviews. | Param | Type | | ------------- | ----------------------------- | | ** ** | { id?: string; } | **Returns:** Promise<any> **Since:** 6.5.0 -------------------- clearCache(...) Clear cache When is omitted, applies to all open webviews. | Param | Ty…