Skip to content

Latest commit

 

History

History
1697 lines (1233 loc) · 29.6 KB

File metadata and controls

1697 lines (1233 loc) · 29.6 KB

WebKitBrowser Plugin

Version: 1.0.0

A WebKitBrowser plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

Description

The WebKitBrowser plugin provides an interface for WebKitBrowser.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].

Configuration

The table below lists configuration options of the plugin.

Name Type Description
callsign string Plugin instance name (default: org.rdk.WebKitBrowser)
classname string Class name: WebKitBrowser
locator string Library name: libWPEFrameworkWebKitBrowser.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the WebKitBrowser plugin:

WebKitBrowser interface methods:

Method Description
addUserScript Add user script to be executed at document start.
collectGarbage Initiate garbage collection
setcoookiejar
removeAllUserScripts Remove all user scripts.
runJavaScript Run javascript in main frame.
reset Resets application data

addUserScript

Add user script to be executed at document start.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.script string Utf8 encoded JS code string.
params.topFrameOnly bool

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.WebKitBrowser.addUserScript",
    "params": {
        "script": "",
        "topFrameOnly": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.WebKitBrowser.addUserScript", "params": {"script": "", "topFrameOnly": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 0,
    "result": null
}

collectGarbage

Initiate garbage collection

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 1,
    "method": "org.rdk.WebKitBrowser.collectGarbage"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.WebKitBrowser.collectGarbage"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 1,
    "result": null
}

cookieJar

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.version integer
params.checksum integer
params.payload string base64 encoded JSON string response to be delivered to $badger.callback

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 2,
    "method": "org.rdk.WebKitBrowser.cookieJar",
    "params": {
        "version": 0,
        "checksum": 0,
        "payload": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.WebKitBrowser.cookieJar", "params": {"version": 0, "checksum": 0, "payload": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 2,
    "result": null
}

removeAllUserScripts

Remove all user scripts.

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 3,
    "method": "org.rdk.WebKitBrowser.removeAllUserScripts"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.WebKitBrowser.removeAllUserScripts"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 3,
    "result": null
}

runJavaScript

Run javascript in main frame.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.script string Utf8 encoded JS code string.

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 4,
    "method": "org.rdk.WebKitBrowser.runJavaScript",
    "params": {
        "script": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.WebKitBrowser.runJavaScript", "params": {"script": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 4,
    "result": null
}

reset

Resets application data

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.type string Type of reset to perform

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.WebKitBrowser.reset",
    "params": {
        "type": "FACTORY"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.WebKitBrowser.reset", "params": {"type": "FACTORY"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 0,
    "result": null
}

Properties

The following properties are provided by the WebKitBrowser plugin:

WebKitBrowser interface properties:

Property Description
bridgeEventWO Send legacy $badger
bridgeReplyWO Response for legacy $badger.
fPSRO Current framerate the browser is rendering at
hTTPCookieAcceptPolicy HTTP cookies accept policy
localStorageEnabled Controls the local storage availability
mixedContentPolicy Mixed content policy
securityProfile Security profile for secure connections
uRL Page loaded in the browser
userAgent UserAgent string used by the browser
userScripts User scripts used by the browser
userStyleSheets User style sheets used by the browser
visibility Browser window visibility state
contentLinkWO URI of the associated application-specific content
identifierRO Application-specific identification string
language Current application user interface language
launchPoint Application launching point
visible Current application visibility

BridgeEvent

Send legacy $badger

This property is write-only.

Events

Event details will be updated soon.

Values

Name Type Description
(property).payload string base64 encoded JSON string response to be delivered to $badger.callback

Examples

Set Request

{
    "jsonrpc": 2.0,
    "id": 11,
    "method": "org.rdk.WebKitBrowser.bridgeEvent",
    "params": {
        "payload": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 11, "method": "org.rdk.WebKitBrowser.bridgeEvent", "params": {"payload": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 11,
    "result": null
}

BridgeReply

Response for legacy $badger.

This property is write-only.

Events

Event details will be updated soon.

Values

Name Type Description
(property).payload string base64 encoded JSON string response to be delivered to $badger.callback

Examples

Set Request

{
    "jsonrpc": 2.0,
    "id": 12,
    "method": "org.rdk.WebKitBrowser.bridgeReply",
    "params": {
        "payload": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 12, "method": "org.rdk.WebKitBrowser.bridgeReply", "params": {"payload": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 12,
    "result": null
}

FPS

Current framerate the browser is rendering at

This property is read-only.

Events

Event details will be updated soon.

Values

Name Type Description
(property).fps integer Current FPS

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 13,
    "method": "org.rdk.WebKitBrowser.fPS"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 13, "method": "org.rdk.WebKitBrowser.fPS"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 13,
    "result": {
        "fps": 0
    }
}

HTTPCookieAcceptPolicy

HTTP cookies accept policy

Events

Event details will be updated soon.

Values

Name Type Description
(property).policy string HTTP Cookie Accept Policy Type (e.g. always)

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 14,
    "method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 14, "method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 14,
    "result": {
        "policy": "ALWAYS"
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 14,
    "method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy",
    "params": {
        "policy": "ALWAYS"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 14, "method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy", "params": {"policy": "ALWAYS"}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 14,
    "result": null
}

LocalStorageEnabled

Controls the local storage availability

Events

Event details will be updated soon.

Values

Name Type Description
(property).enabled bool

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 15,
    "method": "org.rdk.WebKitBrowser.localStorageEnabled"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 15, "method": "org.rdk.WebKitBrowser.localStorageEnabled"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 15,
    "result": {
        "enabled": true
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 15,
    "method": "org.rdk.WebKitBrowser.localStorageEnabled",
    "params": {
        "enabled": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 15, "method": "org.rdk.WebKitBrowser.localStorageEnabled", "params": {"enabled": true}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 15,
    "result": null
}

MixedContentPolicy

Mixed content policy

Events

Event details will be updated soon.

Values

Name Type Description
(property).policy string Mixed content policy type

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 16,
    "method": "org.rdk.WebKitBrowser.mixedContentPolicy"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 16, "method": "org.rdk.WebKitBrowser.mixedContentPolicy"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 16,
    "result": {
        "policy": "ALLOWED"
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 16,
    "method": "org.rdk.WebKitBrowser.mixedContentPolicy",
    "params": {
        "policy": "ALLOWED"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 16, "method": "org.rdk.WebKitBrowser.mixedContentPolicy", "params": {"policy": "ALLOWED"}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 16,
    "result": null
}

SecurityProfile

Security profile for secure connections

Events

Event details will be updated soon.

Values

Name Type Description
(property).profile string Security profile for secure connections (e.g. compatible)

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 17,
    "method": "org.rdk.WebKitBrowser.securityProfile"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 17, "method": "org.rdk.WebKitBrowser.securityProfile"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 17,
    "result": {
        "profile": ""
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 17,
    "method": "org.rdk.WebKitBrowser.securityProfile",
    "params": {
        "profile": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 17, "method": "org.rdk.WebKitBrowser.securityProfile", "params": {"profile": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 17,
    "result": null
}

URL

Page loaded in the browser

Events

Event details will be updated soon.

Values

Name Type Description
(property).url string Loaded URL (e.g. https://example.com)

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 18,
    "method": "org.rdk.WebKitBrowser.uRL"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 18, "method": "org.rdk.WebKitBrowser.uRL"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 18,
    "result": {
        "url": ""
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 18,
    "method": "org.rdk.WebKitBrowser.uRL",
    "params": {
        "url": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 18, "method": "org.rdk.WebKitBrowser.uRL", "params": {"url": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 18,
    "result": null
}

UserAgent

UserAgent string used by the browser

Events

Event details will be updated soon.

Values

Name Type Description
(property).useragent string UserAgent value (e.g. Mozilla/5.0 (Linux; x86_64 GNU/Linux) AppleWebKit/601.1 (KHTML, like Gecko) Version/8.0 Safari/601.1 WP)

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 19,
    "method": "org.rdk.WebKitBrowser.userAgent"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 19, "method": "org.rdk.WebKitBrowser.userAgent"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 19,
    "result": {
        "useragent": ""
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 19,
    "method": "org.rdk.WebKitBrowser.userAgent",
    "params": {
        "useragent": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 19, "method": "org.rdk.WebKitBrowser.userAgent", "params": {"useragent": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 19,
    "result": null
}

UserScripts

User scripts used by the browser

Events

Event details will be updated soon.

Values

Name Type Description
(property).uris IStringIterator JSON array containing URIs pointing to user scripts, supported protocols: file://
(property).uris[#] string

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 20,
    "method": "org.rdk.WebKitBrowser.userScripts"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 20, "method": "org.rdk.WebKitBrowser.userScripts"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 20,
    "result": [
        ""
    ]
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 20,
    "method": "org.rdk.WebKitBrowser.userScripts",
    "params": [
        ""
    ]
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 20, "method": "org.rdk.WebKitBrowser.userScripts", "params": [""]}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 20,
    "result": null
}

UserStyleSheets

User style sheets used by the browser

Events

Event details will be updated soon.

Values

Name Type Description
(property).uris IStringIterator JSON array containing URIs pointing to user scripts, supported protocols: file://
(property).uris[#] string

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 21,
    "method": "org.rdk.WebKitBrowser.userStyleSheets"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 21, "method": "org.rdk.WebKitBrowser.userStyleSheets"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 21,
    "result": [
        ""
    ]
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 21,
    "method": "org.rdk.WebKitBrowser.userStyleSheets",
    "params": [
        ""
    ]
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 21, "method": "org.rdk.WebKitBrowser.userStyleSheets", "params": [""]}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 21,
    "result": null
}

Visibility

Browser window visibility state

Events

Event details will be updated soon.

Values

Name Type Description
(property).visible string Visiblity state (e.g. )

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 22,
    "method": "org.rdk.WebKitBrowser.visibility"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 22, "method": "org.rdk.WebKitBrowser.visibility"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 22,
    "result": {
        "visible": "HIDDEN"
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 22,
    "method": "org.rdk.WebKitBrowser.visibility",
    "params": {
        "visible": "HIDDEN"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 22, "method": "org.rdk.WebKitBrowser.visibility", "params": {"visible": "HIDDEN"}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 22,
    "result": null
}

ContentLink

URI of the associated application-specific content

This property is write-only.

Events

Event details will be updated soon.

Values

Name Type Description
(property).link string Content URI (e.g. https://youtube.com)

Examples

Set Request

{
    "jsonrpc": 2.0,
    "id": 2,
    "method": "org.rdk.WebKitBrowser.contentLink",
    "params": {
        "link": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.WebKitBrowser.contentLink", "params": {"link": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 2,
    "result": null
}

Identifier

Application-specific identification string

This property is read-only.

Events

Event details will be updated soon.

Values

Name Type Description
(property).id string Identifier string

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 3,
    "method": "org.rdk.WebKitBrowser.identifier"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.WebKitBrowser.identifier"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 3,
    "result": {
        "id": ""
    }
}

Language

Current application user interface language

Events

Event details will be updated soon.

Values

Name Type Description
(property).language string Language string as per RFC5646 (e.g. en)

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 4,
    "method": "org.rdk.WebKitBrowser.language"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.WebKitBrowser.language"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 4,
    "result": {
        "language": ""
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 4,
    "method": "org.rdk.WebKitBrowser.language",
    "params": {
        "language": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.WebKitBrowser.language", "params": {"language": ""}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 4,
    "result": null
}

LaunchPoint

Application launching point

Events

Event details will be updated soon.

Values

Name Type Description
(property).point string

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 5,
    "method": "org.rdk.WebKitBrowser.launchPoint"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 5, "method": "org.rdk.WebKitBrowser.launchPoint"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 5,
    "result": {
        "point": "UNDEFINED"
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 5,
    "method": "org.rdk.WebKitBrowser.launchPoint",
    "params": {
        "point": "UNDEFINED"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 5, "method": "org.rdk.WebKitBrowser.launchPoint", "params": {"point": "UNDEFINED"}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 5,
    "result": null
}

Visible

Current application visibility

Events

Event details will be updated soon.

Values

Name Type Description
(property).visiblity bool

Examples

Get Request

{
    "jsonrpc": 2.0,
    "id": 6,
    "method": "org.rdk.WebKitBrowser.visible"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 6, "method": "org.rdk.WebKitBrowser.visible"}' http://127.0.0.1:9998/jsonrpc

Get Response

{
    "jsonrpc": 2.0,
    "id": 6,
    "result": {
        "visiblity": true
    }
}

Set Request

{
    "jsonrpc": 2.0,
    "id": 6,
    "method": "org.rdk.WebKitBrowser.visible",
    "params": {
        "visiblity": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 6, "method": "org.rdk.WebKitBrowser.visible", "params": {"visiblity": true}}' http://127.0.0.1:9998/jsonrpc

Set Response

{
    "jsonrpc": 2.0,
    "id": 6,
    "result": null
}

Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the WebKitBrowser plugin:

WebKitBrowser interface events:

Event Description
cookieJarChanged Notifies that cookies were added, removed or modified.
loadFailed Browser failed to load page
loadFinished Initial HTML document has been completely loaded and parsed
pageClosure Notifies that the web page requests to close its window
uRLChange Signals a URL change in the browser
visibilityChange Application visibility changes

cookieJarChanged

Notifies that cookies were added, removed or modified.

Parameters

This method takes no parameters.

Examples

{
    "jsonrpc": 2.0,
    "id": 5,
    "method": "org.rdk.WebKitBrowser.cookieJarChanged"
}

loadFailed

Browser failed to load page

Parameters

Name Type Description
params object
params.URL string The URL that has been loaded (e.g. https://example.com)

Examples

{
    "jsonrpc": 2.0,
    "id": 6,
    "method": "org.rdk.WebKitBrowser.loadFailed",
    "params": {
        "URL": ""
    }
}

loadFinished

Initial HTML document has been completely loaded and parsed

Parameters

Name Type Description
params object
params.URL string The URL that has been loaded (e.g. https://example.com)
params.httpstatus integer The response code of main resource request (e.g. 200)

Examples

{
    "jsonrpc": 2.0,
    "id": 7,
    "method": "org.rdk.WebKitBrowser.loadFinished",
    "params": {
        "URL": "",
        "httpstatus": 0
    }
}

pageClosure

Notifies that the web page requests to close its window

Parameters

This method takes no parameters.

Examples

{
    "jsonrpc": 2.0,
    "id": 8,
    "method": "org.rdk.WebKitBrowser.pageClosure"
}

uRLChange

Signals a URL change in the browser

Parameters

Name Type Description
params object
params.URL string The URL that has been loaded (e.g. https://example.com)
params.loaded bool loaded (true) or not (false)

Examples

{
    "jsonrpc": 2.0,
    "id": 9,
    "method": "org.rdk.WebKitBrowser.uRLChange",
    "params": {
        "URL": "",
        "loaded": true
    }
}

visibilityChange

Application visibility changes

Parameters

Name Type Description
params object
params.hidden bool Denotes if application is currently hidden

Examples

{
    "jsonrpc": 2.0,
    "id": 1,
    "method": "org.rdk.WebKitBrowser.visibilityChange",
    "params": {
        "hidden": true
    }
}