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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-second-webview

v2.3.1

Published

This cordova plugin enables you to open a second webview in your app. This webview is totally independent from the main webview, but allows you tu access plugins and other Cordova resources. It's possible to modify this plugin to allow multiple webviews.

Downloads

9

Readme

cl.kunder.webview

This cordova plugin enables you to open a second webview in your app. This webview is totally independent from the main webview, but allows you tu access plugins and other Cordova resources.

It's possible to modify this plugin to allow multiple webviews.

Report issues on github issue tracker

Installation

    cordova plugin add github.com/kunder-lab/cl.kunder.webview.git

Supported Platforms

  • Android
  • iOS

Quick Start

To open a new webview, just call in your app's js:

    webview.Show(URL);

Where URL is the path to the page to be opened. In Android, the plugin automatically adds the prefix file:///android_asset/www/ But only if no *:// or javascript: is present at the front of the URL.

Then, to close the second webview and return to the main view, call in your second webview (the opened webview, not the main webview):

    webview.Close();

This will close and destroy the second webview.

webView

The webViewobject provides a way to manage a second webview inside your cordova app. This could be usefull if you want to open a second page as a popup or you want to load new content that is totally unrelated to the main view, but still have the ability to use cordova plugins.

The main difference with inAppBrowser plugin is that cl.kunder.webview plugin can access and use all cordova plguins installed in your app.

Methods

  • Show: Opens a new webView
  • Close: Close and destroy the webView
  • Hide: Same as Close
  • SubscribeCallback: Suscribes a callback that is fired when webView is closed

Show

Parameters:

  • url: The url to be opened. In Android, if the url does not contain a protocol prefix (*:// or javascript:*), the prefix file:///android_asset/www/ will be automatically added. (String)
  • successCallback: Is triggered when the plugin is succesfully called. (Function)
  • errorCallback: Is triggered when the plugin fails to be called or is called with error. (Function)
  • loading: Should show a loading dialog while webview is loading. (Boolean optional)

Close/Hide

Parameters:

  • successCallback: Is triggered when the plugin is succesfully called. (Function)
  • errorCallback: Is triggered when the plugin fails to be called or is called with error. (Function)

HideLoading

Close the loading shown by Show method.

Parameters:

  • sucessCallback: The callback that will be called when the loading is closed. (Function optional)
  • errorCallback: Is triggered when the plugin fails to be called or is called with error. (Function optional)

SubscribeCallback

Suscribes a callback that is triggered when a webView is closed.

Parameters:

  • successCallback: The callback that will be called when a webview is closed. (Function)
  • errorCallback: Is triggered when the plugin fails to be called or is called with error. (Function)

SubscribeExitCallback (Android only)

Subscribes an exit callback that is triggered when ExitApp method is called.

Parameters:

  • successCallback: The callback that will be called when a webview is closed. (Function)
  • errorCallback: Is triggered when the plugin fails to be called or is called with error. This can be empty function (Function)

ExitApp (Android)

This method execute the subscribed exit callback if exist. Then close the webview. This method is usefull when onResume event is defined in your main app. You should set a flag in subscribeExitCallback success method. Then in onResume event you should verify the flag value. Finally the main app should call ionic.Platform.exitApp() method to close the app.

ExitApp (iOS)

This method execute objective-C exit(0) method.