Portable webOS utility library for access to webOS-specific features and functionality
Version:
  • 0.1.0
Author:
  • LG Silicon Valley Labs
Source:

window.webOS

Namespaces

deviceInfo
feedback
notification
platform
service
voicereadout

Members

(static, readonly) libVersion :string

Version string for this webOS.js build
Type:
  • string
Default Value:
  • 0.1.0
Source:

(static, readonly) platform :object

Platform identification of webOS variants
Type:
  • object
Properties:
Name Type Attributes Description
tv boolean <nullable>
Set true for LG webOS SmartTV
watch boolean <nullable>
Set true for LG webOS SmartWatch
open boolean <nullable>
Set true for Open webOS
legacy boolean <nullable>
Set true for legacy webOS (Palm and HP hardware)
unknown boolean <nullable>
Set true for any unknown system
Source:

Methods

(static) alert(messageId, keyVals, freeText)

Logs with PmLogLib at the "alert" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) critical(messageId, keyVals, freeText)

Logs with PmLogLib at the "critical" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) debug(freeText)

Logs with PmLogLib at the "debug" level
Parameters:
Name Type Description
freeText string Text string to log
Source:

(static) deviceInfo(callback)

Gets the device-specific information regarding model, OS version, specifications, etc.
Parameters:
Name Type Description
callback webOS~deviceCallback The function to call once the information is collected
Source:

(static) emergency(messageId, keyVals, freeText)

Logs with PmLogLib at the "emergency" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) error(messageId, keyVals, freeText)

Logs with PmLogLib at the "error" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) fetchAppId() → {string}

Fetches the appID of the caller app
Source:
Returns:
AppID of the app.
Type
string

(static) fetchAppInfo(callback, pathopt)

Fetches the appinfo.json data of the caller app with a cache saved to webOS.appInfo
Parameters:
Name Type Attributes Description
callback webOS~appInfoCallback The function to called upon completion
path string <optional>
A relative filepath from the current document to a specific appinfo to read
Source:

(static) fetchAppRootPath() → {string}

Fetches the full root URI path of the caller app
Source:
Returns:
App's URI path the app is within.
Type
string

(static) info(messageId, keyVals, freeText)

Logs with PmLogLib at the "info" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) notice(messageId, keyVals, freeText)

Logs with PmLogLib at the "notice" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

(static) warning(messageId, keyVals, freeText)

Logs with PmLogLib at the "warning" level
Parameters:
Name Type Description
messageId string Short string that uniquely identifies the log message within a component.
keyVals object Key-value pairs to log
freeText string Text string to log
Source:

Type Definitions

appInfoCallback(infonullable)

Parameters:
Name Type Attributes Description
info object <nullable>
JSON data object read from the app's "appinfo.json" file. Undefined if not found.
Source:

deviceCallback(info)

Parameters:
Name Type Description
info object JSON object containing the device information details
Properties
Name Type Attributes Description
modelName string Model name of device in UTF-8 format
modelNameAscii string Model name of device in ASCII format
version string Full OS firmware version string
versionMajor number Subset of OS version string: Major version number
versionMinor number Subset of OS version string: Minor version number
versionDot number Subset of OS version string: Dot version number
sdkVersion string webOS SDK version
screenWidth number Width in pixels
screenHeight number Height in pixels
uhd boolean <optional>
Whether supports Ultra HD resolution.
Source: