From bc03bd1f3b61f93963a50418860da0c8c53c4720 Mon Sep 17 00:00:00 2001 From: Oluwaseye Date: Sun, 10 Sep 2017 21:12:43 -0400 Subject: [PATCH] Updated README with Vanilla JS Example --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 7d69fe2..a6c01cd 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,27 @@ public whateverYouLike() { ``` +#### Javascript + +```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)