Internal OS web browser library. Currently works on android and iOS platforms


Main Features

  • Full-screen and Popup mode.
  • Custom userAgent header value
  • Popup mode has a close button on the top-left corner.
  • Whitelist validation (the webview will close if the user goes to a non-whitelisted URL).
  • Blacklist validation (the webview will close if the user goes to a blacklisted URL).
  • onClose event (Android and iOS).
  • onURLChanging events for controling the WebView (Android and iOS).
  • On non-supported platforms, this extensions has no effect (makes nothing).


has fields:

onClose

set function for on close event here, no arguments passing.


onURLChanging

set function for on url changing event here, url as function argument



has methods:

Lib.WebView.isSupported()

check if Lib support WebView on current platform


Lib.WebView.open(url, userAgent, floating, urlWhiteList, urlBlackList)

open web view with url, userAgent, floating (popup or not), urlWhiteList array and urlBlackList array parameters

url - navigation url

userAgent - custom browser userAgent header value. Use nil for default.

floating - popup condition, true/false

urlWhiteList - array of white listed urls

urlBlackList - array of black listed urls


Examples:


local url = "http://localhost:2001"

if Lib.WebView.isSupported() then

       Lib.WebView.open(url, nil, true, nil, nil)

else

       Lib.Media.System.getURL(Lib.Media.Net.URLRequest.new(url), "_blank")

end

Created with the Personal Edition of HelpNDoc: iPhone web sites made easy