WebView native control which allows you to load external URLs and show it's content in your application.
init(x, y, width, height)
Initializes newly created WebView with position and size.
show()
shows initialized WebView (initially all native controls are hidden).
hide()
hides initialized WebView.
loadURL(URL)
Loads given URL in WebView.
setScalesToFit(isScaled)
sets if WebView should scale page to fit or display the page in it's original size.
loadHTML(html, baseURL)
directly loads specified HTML code using baseURL as base URL for the content
loadFromBundle(name)
loads html file from application bundle
goBack()
loads previous page from history inside webView.
goForward()
loads previous page from history inside webView.
reload()
reloads current page in webView.
setOnFinishCallback(callback)
sets the callback which will be called when the page is loaded in the current web view. Callback is a string function name to be called.
setDetectsPhoneNumbers(detectionAllowed)
enables/disables telephone numbers detection, can take values "yes" and "no"
Initialization of the webview.
var webView = new NKWebView();
webView.init(0, 0, 320, 300);
Load external webpage into webView, set options and show it
webView.loadURL("http://www.nimblekit.com");
webView.setScalesToFit("yes");
webView.setOnFinishCallback("myCallback");
webView.show();
See the example source code for a more detailed implementation.