MCPcopy Index your code
hub / github.com/bradmartin/nativescript-advanced-webview

github.com/bradmartin/nativescript-advanced-webview @1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.2.0 ↗ · + Follow
15 symbols 23 edges 10 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

npm npm

NativeScript-Advanced-Webview

An advanced webview using Chrome Custom Tabs on Android and SFSafariViewController on iOS.

Here is a video showing off Chrome CustomTabs in NativeScript.

Perf Matters

Android Comparison

Android

CustomTabs

iOS

SFSafariViewController

Demo

Android iOS
Android Sample iOS Sample

Installation

To install execute

tns plugin add nativescript-advanced-webview

Example

TypeScript

import { openAdvancedUrl, AdvancedWebViewOptions } from 'nativescript-advanced-webview';
    //// or
import * as AdvancedWebView from 'nativescript-advanced-webview'

public whateverYouLike() {

    let opts: AdvancedWebViewOptions = {
        url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
        toolbarColor: '#ff4081',
        toolbarControlsColor: '#333', // iOS only
        showTitle: false // Android only
    };

    openAdvancedUrl(opts);
}

Javascript


var AdvancedWebView  = require("nativescript-advanced-webview");

exports.openChromTabs = function(args){
    //var gotoUrl = args.view.bindingContext.url;

    var opts = {
            url: args.view.bindingContext.url,
            toolbarColor: '#ff4081',
            toolbarControlsColor: '#333', // iOS only
            showTitle: false // Android only
    };
   console.log(args.view.bindingContext.url);

   AdvancedWebView.openAdvancedUrl(opts);

API

  • openAdvancedUrl(options: AdvancedWebViewOptions)
AdvancedWebViewOptions Properties
  • url: string
  • toolbarColor: string
  • toolbarControlsColor: string - ** iOS only **
  • showTitle: boolean - ** Android only **

Extension points exported contracts — how you extend this code

AdvancedWebViewOptions (Interface)
(no doc)
advanced-webview.android.ts
AdvancedWebViewOptions (Interface)
(no doc)
advanced-webview.ios.ts
AdvancedWebViewOptions (Interface)
(no doc)
index.d.ts

Core symbols most depended-on inside this repo

initWithOwner
called by 1
advanced-webview.ios.ts
openAdvancedUrl
called by 1
advanced-webview.ios.ts
openAdvancedUrl
called by 0
advanced-webview.android.ts
safariViewControllerDidCompleteInitialLoad
called by 0
advanced-webview.ios.ts
safariViewControllerDidFinish
called by 0
advanced-webview.ios.ts
navigatingTo
called by 0
demo/app/main-page.ts
constructor
called by 0
demo/app/main-view-model.ts
onTap
called by 0
demo/app/main-view-model.ts

Shape

Method 5
Class 4
Function 3
Interface 3

Languages

TypeScript100%

Modules by API surface

advanced-webview.ios.ts7 symbols
demo/app/main-view-model.ts4 symbols
advanced-webview.android.ts2 symbols
index.d.ts1 symbols
demo/app/main-page.ts1 symbols

For agents

$ claude mcp add nativescript-advanced-webview \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact