Browser Embedded Functions
This document describes the browser-level functions used for navigation within ScreenSoft.
The ScreenSoft application is structured as follows:
- Presentation layer – Used for company presentations, advertising, events, and promotional content.
- Application layer – A kiosk environment that contains multiple types of applications, including the browser application.
These functions allow navigation:
- From the browser (in the Application layer) → Presentation layer.
- From the browser (in the Application layer) → Application layer.
onUp
The onUp
function navigates back one step in the ScreenSoft navigation stack.
From the browser, it will switch either to the Presentation layer or the Application layer, depending on the defined navigation path.
Basic Usage
window.onUp({
request: '{}',
onSuccess: function(response) {
console.log(response);
},
onFailure: function(error_code, error_message) {
console.log(error_message);
}
});
Parameters
-
request
An empty object{}
is required. -
onSuccess
(callback function) Triggered if the operation succeeds. -
response
:null
. -
onFailure
(callback function) Triggered if the operation fails. -
error_code
:-1
. error_message
:"Disabled application layer. Single-app kiosk"
Note: In single-app kiosk mode, navigation to the application layer may be restricted.
showLayerBottom
The showLayerBottom
function switches the view from the browser directly to the Application layer, where all applications are available in multi-app kiosk mode.
Basic Usage
window.showLayerBottom({
request: '{}',
onSuccess: function(response) {
console.log(response);
},
onFailure: function(error_code, error_message) {
console.log(error_message);
}
});
Parameters
-
request
An empty object{}
is required. -
onSuccess
(callback function) Triggered if the operation succeeds. -
response
:null
. -
onFailure
(callback function) Triggered if the operation fails. -
error_code
:-1
.error_message
:"Single-app kiosk"
Note: This function fails in single-app kiosk mode, where switching to the application layer is disabled.
showLayerTop
The showLayerTop
function switches from the browser application (Application layer) directly to the Presentation layer, which is primarily used for company presentations, advertising, and
events.
Basic Usage
window.showLayerTop({
request: '{}',
onSuccess: function(response) {
console.log(response);
},
onFailure: function(error_code, error_message) {
console.log(error_message);
}
});
Parameters
-
request
An empty object{}
is required. -
onSuccess
(callback function) Triggered if the operation succeeds. -
response
:null
. -
onFailure
(callback function) Triggered if the operation fails. -
error_code
:-1
. error_message
:"Presentation layer disabled"
Note: If the presentation layer is disabled by system configuration, this function will return an error.
✅ Additional Recommendations
- Use
onUp
to navigate back to either the top or application layer based on context. - Use
showLayerTop
for switching from the browser to the presentation layer (advertising and presentation mode). - Handle all
onFailure
callbacks to ensure clear error feedback.