Module: siteKiosk.ui.views.custom

A module, which allows the parent web view to access a script interface provided by its child web view.

new siteKiosk.ui.views.custom()

Creates a custom view.

Members

<readonly> isView :boolean

Identifies a view.
Type:
  • boolean
Inherited From:

Methods

activate()

Activates the view
Inherited From:

allowLayoutUpdates()

Enables updating the layout, when a property changes.
Inherited From:

back()

Navigates one page back in the history, if possible.
Inherited From:

canGoBack() → {boolean}

Returns whether the history contains any previous pages.
Inherited From:
Returns:
Whether the history contains any previous pages
Type
boolean

canGoForward() → {boolean}

Returns whether the history contains any nexw pages.
Inherited From:
Returns:
Whether the history contains any next pages
Type
boolean

center()

Centers the view in the middle of the screen.
Inherited From:

clearHistory()

Clears the history (affects back and forward actions).
Inherited From:

close()

Closes the web view.
Inherited From:

disableInteraction()

Disables interaction: The webview will no longer receive any touch events or display input dialogs.
Inherited From:

enableInteraction()

Enables interaction: The webview willreceive touch events and display input dialogs.
Inherited From:

focus()

Focus the views
Inherited From:

forward()

Navigates one page forward in the history, if possible.
Inherited From:

getAllowContextMenu() → {boolean}

Gets the whether the context menu display is allowed.
Inherited From:
Returns:
True when context menu display is allowed.
Type
boolean

getAllowPrinting() → {boolean}

Gets whether this view can use print commands.
Inherited From:
Returns:
Whether printing is allowed
Type
boolean

getBuiltInZoomControls() → {boolean}

Returns whether zoom controls are being displayed.
Inherited From:
Returns:
Whether zoom controls are being displayed
Type
boolean

getCanMaximize() → {boolean}

Gets whether the view can be maximized
Inherited From:
Returns:
The state.
Type
boolean

getCanMinimize() → {boolean}

Gets whether the view can be minimized
Inherited From:
Returns:
The state.
Type
boolean

getCertificateWhitelist() → {*}

Gets the certificate whitelist, to white list pages, which will no longer trigger certificate warnings.
Inherited From:
Returns:
A list of pages, which should not show certificate warnings
Type
*

getClipRect() → {*}

Gets the view's clip rect.
Inherited From:
Returns:
The view's clip rect
Type
*

getContentFilterCategories() → {Array.<string>}

Gets the categories the content filter should block.
Inherited From:
Returns:
A set of content filter categories
Type
Array.<string>

getContentFilterMechanisms() → {Array.<string>}

Gets the mechanisms, used by the content filter. Can contain any of the following values: 'keywords', 'domains'.
Inherited From:
Returns:
A set currently active content filter mechanisms
Type
Array.<string>

getFilterContent() → {boolean}

Gets whether this view should filter requests.
Inherited From:
Returns:
Whether request filtering is activated
Type
boolean

getFilterExternalResources() → {boolean}

Gets whether external resources like iframes or images are being filtered.
Inherited From:
Returns:
Whether external resources are being filtered
Type
boolean

getHeight() → {number}

Gets the view's height.
Inherited From:
Returns:
The view's height
Type
number

getHideWhenClose() → {boolean}

Gets whether the view is will hide when the user tries to close it.
Inherited From:
Returns:
The state.
Type
boolean

getIsBrowsable() → {boolean}

Gets the whether the web view control will be used to browse the internet.
Inherited From:
Returns:
True when the control can be used to browse
Type
boolean

getIsCloseable() → {boolean}

Gets whether the view is closeable,
Inherited From:
Returns:
The closeability.
Type
boolean

getLeft() → {number}

Returns the left anchor.
Inherited From:
Returns:
The left ancor
Type
number

getLogNavigation() → {boolean}

Gets whether this view should log navigations.
Inherited From:
Returns:
Whether logging is allowed
Type
boolean

getName() → {string}

Gets the view's name.
Inherited From:
Returns:
The view's name
Type
string

getOpacity() → {number}

Gets the view's opacity.
Inherited From:
Returns:
The view's opacity
Type
number

getPageFavIcons() → {Array.<string>}

Gets the fav icons available from the current main page
Inherited From:
Returns:
The page fav icons
Type
Array.<string>

getPageTitle() → {string}

Gets the title of the current main page
Inherited From:
Returns:
The page title
Type
string

getParent() → {number}

Gets the view's parent.
Inherited From:
Returns:
value The parent's view id
Type
number

getPopupHandlingMode() → {number}

Gets the current popup handling mode.
Inherited From:
Returns:
The popup handling mode
Type
number

getRelativeClipRect() → {*}

Gets the view's relative clip rect.
Inherited From:
Returns:
The view's relative clip rect
Type
*

getRelativeLeft() → {number}

Gets the relative left anchor.
Inherited From:
Returns:
The relative left anchor
Type
number

getRelativeTop() → {number}

Gets the relative top anchor.
Inherited From:
Returns:
The relative top anchor
Type
number

getRoot() → {View}

Gets the view's root.
Inherited From:
Returns:
value The root's view
Type
View

getScriptFilter() → {*}

Gets the script filter list currently used to restrict page script access.
Inherited From:
Returns:
A list of patters to match against
Type
*

getShowBorder() → {boolean}

Gets the whether the web view control has visible borders.
Inherited From:
Returns:
True when the control has visible borders.
Type
boolean

getShowInTaskbar() → {boolean}

Gets wether the window should be displayeed in the taskbar
Inherited From:
Returns:
Should this window be displayed in the taskbar
Type
boolean

getTitle() → {string}

Getsthe title of this view.
Inherited From:
Returns:
The title.
Type
string

getTop() → {number}

Returns the top anchor.
Inherited From:
Returns:
the top anchor
Type
number

getTopMost() → {boolean}

Gets if the view is top most.
Inherited From:
Returns:
Is the view top most.
Type
boolean

getUrl() → {string}

Gets the current URL.
Inherited From:
Returns:
The URL of the currently visible page
Type
string

getUrlFilter() → {*}

Gets the URL filter list currently used to restrict page access.
Inherited From:
Returns:
A list of patters to match against
Type
*

getUserAgent() → {string}

Gets the User-Agent HTTP header.
Inherited From:
Returns:
The User-Agent HTTP header
Type
string

getUserAgentString() → {string}

Gets the user-agent string.
Inherited From:
Returns:
The User-Agent HTTP header
Type
string

getUseWideViewPort() → {boolean}

Returns whether the device emulates a desktop-like view-port.
Inherited From:
Returns:
Whether the device emulates a desktop-like view-port
Type
boolean

getVisibility() → {string}

Gets the view's visibility.
Inherited From:
Returns:
The view's visibility
Type
string

getWidth() → {number}

Gets the view's width.
Inherited From:
Returns:
The view's width
Type
number

getZIndex() → {number}

Gets the view's z-index.
Inherited From:
Returns:
The view's z-index
Type
number

getZoom() → {number}

Gets the current zoom level.
Inherited From:
Returns:
The zoom level
Type
number

guessUrl(url) → {string}

Tries to guess the url from any user input.
Parameters:
Name Type Description
url string User input
Inherited From:
Returns:
The guessed URL.
Type
string

invalidate()

Forces a redraw.
Inherited From:

isUrlAccessAllowed(url, log) → {boolean}

Gets whether a URL is allowed or not (defined by the URL filter).
Parameters:
Name Type Description
url string The URL to check
log boolean Whether this attempt should be logged, if it fails
Inherited From:
Returns:
Whether the provided url is allowed
Type
boolean
Tries to navigate from any user input
Parameters:
Name Type Description
url string User input
log boolean Navigation Should this navigation be logged
Inherited From:
Tries to render the specified HTML code
Parameters:
Name Type Description
html string HTML code to display
Inherited From:

onActivated(callback) → {siteKiosk.ui.view~eventSubscription}

Registers a callback, which will be triggered when a view is activated
Parameters:
Name Type Description
callback siteKiosk.ui.view~activatedCallback The callback, which will be triggered when a view is activated
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.view~eventSubscription

onClosed(callback) → {siteKiosk.ui.view~eventSubscription}

Registers a callback, which will be triggered when a view is closed
Parameters:
Name Type Description
callback siteKiosk.ui.view~closedCallback The callback, which will be triggered when a view is closed
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.view~eventSubscription

onDeactivated(callback) → {siteKiosk.ui.view~eventSubscription}

Registers a callback, which will be triggered when a view is deactivated
Parameters:
Name Type Description
callback siteKiosk.ui.view~deactivatedCallback The callback, which will be triggered when a view is deactivated
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.view~eventSubscription

onDownloadStart(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when the web view cannot render the content, because its a download.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~onDownloadStartCallback The callback, which will be triggered when the web view cannot render the content, because its a download
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onError(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when the page load results in an error.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~errorCallback The callback, which will be triggered when the page load results in an error
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onGotFocus(callback) → {siteKiosk.ui.view~eventSubscription}

Registers a callback, which will be triggered when a view receives the focus.
Parameters:
Name Type Description
callback siteKiosk.ui.view~gotFocusCallback The callback, which will be triggered when a view receives the focus
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.view~eventSubscription

onHideCustomView(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when the custom view has been removed.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~hideCustomViewCallback The callback, which will be triggered when the custom view has been created
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onLoadingStateChange(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a the loading state changes (isLoading, canGo forward/back)
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~loadingStateChangeCallback The callback, which will be triggered when a state is changing
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageBlocked(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a page has been blocked.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageStartedCallback The callback, which will be triggered when a page has been blocked
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageFaviconChange(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a the favicons of the current page have been changed
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageFaviconChange The callback, which will be triggered when a favicons change is happening is changing
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageFinished(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a page has completed loading.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageFinishedCallback The callback, which will be triggered when a page has completed loading
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageProgress(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a pages progress has been changed.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageProgressCallback The callback, which will be triggered when a pages progress has been changed
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageSecurityChanged(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when the page security level has changed.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageSecurityChangedCallback The callback, which will be triggered when a page has completed loading
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageStarted(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a new page is being loaded.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageStartedCallback The callback, which will be triggered when a new page is being loaded
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPageTitleChanged(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a page title has been changed.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~pageStartedCallback The callback, which will be triggered when a page title changes
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPopupViewCreated(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a popup view has been created
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~popupViewCreated The callback, which will be triggered when a popupView has been created
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onPrintRequest(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when this view wants to print something
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~printRequest The callback, which will be triggered when the view wants to print something
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

onShowCustomView(callback) → {siteKiosk.ui.views.web~eventSubscription}

Registers a callback, which will be triggered when a custom view has been created.
Parameters:
Name Type Description
callback siteKiosk.ui.views.web~showCustomViewCallback The callback, which will be triggered when a custom view has been created
Inherited From:
Returns:
An handler to unsubscribe the event
Type
siteKiosk.ui.views.web~eventSubscription

preventLayoutUpdates()

Prevents layout changes from happening.
Inherited From:

print(jobName)

Prints the current page.
Parameters:
Name Type Description
jobName string A name for the print job
Inherited From:

reload()

Reloads the current page.
Inherited From:

setAllowContextMenu(value)

Sets whether the context menu display is allowed.
Parameters:
Name Type Description
value boolean The state to set.
Inherited From:

setAllowPrinting(value)

Sets whether this view can use print commands.
Parameters:
Name Type Description
value boolean Whether printing is allowed
Inherited From:

setBackgroundColor(colorString)

Sets the background color. Warning: Alpha values other than 0xFF may affect rendering speed.
Parameters:
Name Type Description
colorString string The color string either in hex formats #RRGGBB, #AARRGGBB or one of 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray'
Inherited From:

setBuiltInZoomControls(builtInZoomControls)

Sets whether zoom controls should be displayed.
Parameters:
Name Type Description
builtInZoomControls boolean Whether zoom controls should be displayed
Inherited From:

setCanMaximize(The)

Sets whether the view can be maximized
Parameters:
Name Type Description
The boolean state.
Inherited From:

setCanMinimize(The)

Sets whether the view can be minimized
Parameters:
Name Type Description
The boolean state.
Inherited From:

setCertificateWhitelist(certificateWhitelist)

Sets the certificate whitelist, to white list pages, which will no longer trigger certificate warnings.
Parameters:
Name Type Description
certificateWhitelist * A list of pages, which should not show certificate warnings
Inherited From:

setClipRect(value)

Sets the view's clip rect.
Parameters:
Name Type Description
value * The view's clip rect
Inherited From:

setContentFilterCategories(contentFilterMechanisms)

Sets the categories the content filter should block.
Parameters:
Name Type Description
contentFilterMechanisms Array.<string> A set of content filter categories
Inherited From:

setContentFilterMechanisms(contentFilterMechanisms)

Sets the mechanisms, used by the content filter. Can contain any of the following values: 'keywords', 'domains'.
Parameters:
Name Type Description
contentFilterMechanisms Array.<string> A selection of content filter mechanisms, which should be active
Inherited From:

setFilterContent(value)

Sets whether this view should filter requests.
Parameters:
Name Type Description
value boolean Whether request filtering is activated
Inherited From:

setFilterExternalResources(filterExternalResources)

Sets whether external resources like iframes or images should be filtered.
Parameters:
Name Type Description
filterExternalResources boolean Whether external resources should be filtered
Inherited From:

setHeight(value)

Sets the view's height.
Parameters:
Name Type Description
value number The view's height
Inherited From:

setHideWhenClose(The)

Sets whether the view is will hide when the user tries to close it.
Parameters:
Name Type Description
The boolean state.
Inherited From:

setIsBrowsable(value)

Sets whether the control will be used to browse the internet.
Parameters:
Name Type Description
value boolean True to use the webview to browse
Inherited From:

setIsCloseable(The)

Sets whether the view is closeable,
Parameters:
Name Type Description
The boolean closeability.
Inherited From:

setLeft(value)

Sets the left anchor.
Parameters:
Name Type Description
value number The left anchor
Inherited From:

setLogNavigation(value)

Sets whether this view should log navigations.
Parameters:
Name Type Description
value boolean Whether logging is allowed
Inherited From:

setMaxSize(width, height)

Sets the view's maxSize.
Parameters:
Name Type Description
width number The view's maxWidth
height number The view's maxHeight
Inherited From:

setMinSize(width, height)

Sets the view's minSize.
Parameters:
Name Type Description
width number The view's minWidth
height number The view's minHeight
Inherited From:

setName()

Sets the view's name.
Inherited From:

setOnConfirmHandler(handler)

Sets a confirm handler. If no handler is set, the web view will show a native dialog.
Parameters:
Name Type Description
handler siteKiosk.ui.views.web~confirmHandler The handler to be invoked
Inherited From:

setOpacity(value)

Sets the view's opacity.
Parameters:
Name Type Description
value number The view's opacity
Inherited From:

setParent(value)

Sets the view's parent.
Parameters:
Name Type Description
value number The parent's view id
Inherited From:

setPopupHandlingMode(value)

Sets the popup handling mode.
Parameters:
Name Type Description
value number The popup handling mode to set.
Inherited From:

setPosition(left, top, isRelativePosition)

Sets the view's position.
Parameters:
Name Type Description
left number The view's left position
top number The view's top position
isRelativePosition bool Are the coordinates relative to the view´s parent.
Inherited From:

setPositionAndSize(left, top, width, height, isRelativePosition)

Sets the view's position and size.
Parameters:
Name Type Description
left number The view's left position
top number The view's top position
width number The view's width
height number The view's height
isRelativePosition bool Are the coordinates relative to the view´s parent.
Inherited From:

setRelativeClipRect(value)

Sets the view's relative clip rect.
Parameters:
Name Type Description
value * The view's relative clip rect
Inherited From:

setRelativeLeft(value)

Sets the relative left anchor.
Parameters:
Name Type Description
value number The relative left anchor
Inherited From:

setRelativeTop(value)

Sets the relative top anchor.
Parameters:
Name Type Description
value number The relative left anchor
Inherited From:

setScriptFilter(scriptFilter)

Sets the script filter list, to restrict page script access.
Parameters:
Name Type Description
scriptFilter * A list of patters to match against
Inherited From:

setShowBorder(value)

Sets whether the control should display control borders
Parameters:
Name Type Description
value boolean True to show the borders.
Inherited From:

setShowInTaskbar(value)

Sets whether the window should be displayed in the taskbar
Parameters:
Name Type Description
value boolean Should this window be displayed in the taskbar
Inherited From:

setSize(width, height)

Sets the view's size.
Parameters:
Name Type Description
width number The view's width
height number The view's height
Inherited From:

setTitle(The)

Sets the view title
Parameters:
Name Type Description
The string title.
Inherited From:

setTop(value)

Sets the top anchor.
Parameters:
Name Type Description
value number The top anchor
Inherited From:

setTopMost(value)

Sets if thew view is top most.
Parameters:
Name Type Description
value boolean Should the view be top most.
Inherited From:

setUrl(value)

Sets the current URL.
Parameters:
Name Type Description
value string The URL of the page to load
Inherited From:

setUrlFilter(urlFilter)

Sets the URL filter list, to restrict page access.
Parameters:
Name Type Description
urlFilter * A list of patters to match against
Inherited From:

setUserAgent(userAgent)

Sets the User-Agent HTTP header.
Parameters:
Name Type Description
userAgent string The User-Agent HTTP header 1 if the web view should use a desktop user-agent string
Inherited From:

setUserAgentString(userAgent)

Sets a user defined user-agent string.
Parameters:
Name Type Description
userAgent string The User-Agent HTTP header
Inherited From:

setUseWideViewPort(useWideViewPort)

Sets whether the device should emulate a desktop-like view-port.
Parameters:
Name Type Description
useWideViewPort boolean Whether the device should emulate a desktop-like view-port
Inherited From:

setVisibility(value)

Sets the view's visibility.
Parameters:
Name Type Description
value string The view's visibility
Inherited From:

setWidth(value)

Sets the view's width.
Parameters:
Name Type Description
value number The view's width
Inherited From:

setZIndex(value)

Sets the view's z-index.
Parameters:
Name Type Description
value number The view's z-index
Inherited From:

setZoom(value)

Sets the zoom level.
Parameters:
Name Type Description
value number The zoom level to set.
Inherited From:

startNewSession()

Starts a new session.
Inherited From:

stop()

Stops page loading.
Inherited From: