Version: 1.0.0
A WebKitBrowser plugin for Thunder framework.
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].
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 |
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 |
Add user script to be executed at document start.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.script | string | Utf8 encoded JS code string. |
| params.topFrameOnly | bool |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.WebKitBrowser.addUserScript",
"params": {
"script": "",
"topFrameOnly": true
}
}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
{
"jsonrpc": 2.0,
"id": 0,
"result": null
}Initiate garbage collection
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.WebKitBrowser.collectGarbage"
}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
{
"jsonrpc": 2.0,
"id": 1,
"result": null
}Event details will be updated soon.
| 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 |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.WebKitBrowser.cookieJar",
"params": {
"version": 0,
"checksum": 0,
"payload": ""
}
}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
{
"jsonrpc": 2.0,
"id": 2,
"result": null
}Remove all user scripts.
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.WebKitBrowser.removeAllUserScripts"
}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
{
"jsonrpc": 2.0,
"id": 3,
"result": null
}Run javascript in main frame.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.script | string | Utf8 encoded JS code string. |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 4,
"method": "org.rdk.WebKitBrowser.runJavaScript",
"params": {
"script": ""
}
}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
{
"jsonrpc": 2.0,
"id": 4,
"result": null
}Resets application data
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.type | string | Type of reset to perform |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.WebKitBrowser.reset",
"params": {
"type": "FACTORY"
}
}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
{
"jsonrpc": 2.0,
"id": 0,
"result": null
}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 |
Send legacy $badger
This property is write-only.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).payload | string | base64 encoded JSON string response to be delivered to $badger.callback |
{
"jsonrpc": 2.0,
"id": 11,
"method": "org.rdk.WebKitBrowser.bridgeEvent",
"params": {
"payload": ""
}
}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
{
"jsonrpc": 2.0,
"id": 11,
"result": null
}Response for legacy $badger.
This property is write-only.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).payload | string | base64 encoded JSON string response to be delivered to $badger.callback |
{
"jsonrpc": 2.0,
"id": 12,
"method": "org.rdk.WebKitBrowser.bridgeReply",
"params": {
"payload": ""
}
}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
{
"jsonrpc": 2.0,
"id": 12,
"result": null
}Current framerate the browser is rendering at
This property is read-only.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).fps | integer | Current FPS |
{
"jsonrpc": 2.0,
"id": 13,
"method": "org.rdk.WebKitBrowser.fPS"
}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
{
"jsonrpc": 2.0,
"id": 13,
"result": {
"fps": 0
}
}HTTP cookies accept policy
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).policy | string | HTTP Cookie Accept Policy Type (e.g. always) |
{
"jsonrpc": 2.0,
"id": 14,
"method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy"
}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
{
"jsonrpc": 2.0,
"id": 14,
"result": {
"policy": "ALWAYS"
}
}{
"jsonrpc": 2.0,
"id": 14,
"method": "org.rdk.WebKitBrowser.hTTPCookieAcceptPolicy",
"params": {
"policy": "ALWAYS"
}
}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
{
"jsonrpc": 2.0,
"id": 14,
"result": null
}Controls the local storage availability
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).enabled | bool |
{
"jsonrpc": 2.0,
"id": 15,
"method": "org.rdk.WebKitBrowser.localStorageEnabled"
}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
{
"jsonrpc": 2.0,
"id": 15,
"result": {
"enabled": true
}
}{
"jsonrpc": 2.0,
"id": 15,
"method": "org.rdk.WebKitBrowser.localStorageEnabled",
"params": {
"enabled": true
}
}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
{
"jsonrpc": 2.0,
"id": 15,
"result": null
}Mixed content policy
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).policy | string | Mixed content policy type |
{
"jsonrpc": 2.0,
"id": 16,
"method": "org.rdk.WebKitBrowser.mixedContentPolicy"
}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
{
"jsonrpc": 2.0,
"id": 16,
"result": {
"policy": "ALLOWED"
}
}{
"jsonrpc": 2.0,
"id": 16,
"method": "org.rdk.WebKitBrowser.mixedContentPolicy",
"params": {
"policy": "ALLOWED"
}
}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
{
"jsonrpc": 2.0,
"id": 16,
"result": null
}Security profile for secure connections
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).profile | string | Security profile for secure connections (e.g. compatible) |
{
"jsonrpc": 2.0,
"id": 17,
"method": "org.rdk.WebKitBrowser.securityProfile"
}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
{
"jsonrpc": 2.0,
"id": 17,
"result": {
"profile": ""
}
}{
"jsonrpc": 2.0,
"id": 17,
"method": "org.rdk.WebKitBrowser.securityProfile",
"params": {
"profile": ""
}
}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
{
"jsonrpc": 2.0,
"id": 17,
"result": null
}Page loaded in the browser
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).url | string | Loaded URL (e.g. https://example.com) |
{
"jsonrpc": 2.0,
"id": 18,
"method": "org.rdk.WebKitBrowser.uRL"
}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
{
"jsonrpc": 2.0,
"id": 18,
"result": {
"url": ""
}
}{
"jsonrpc": 2.0,
"id": 18,
"method": "org.rdk.WebKitBrowser.uRL",
"params": {
"url": ""
}
}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
{
"jsonrpc": 2.0,
"id": 18,
"result": null
}UserAgent string used by the browser
Event details will be updated soon.
| 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) |
{
"jsonrpc": 2.0,
"id": 19,
"method": "org.rdk.WebKitBrowser.userAgent"
}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
{
"jsonrpc": 2.0,
"id": 19,
"result": {
"useragent": ""
}
}{
"jsonrpc": 2.0,
"id": 19,
"method": "org.rdk.WebKitBrowser.userAgent",
"params": {
"useragent": ""
}
}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
{
"jsonrpc": 2.0,
"id": 19,
"result": null
}User scripts used by the browser
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).uris | IStringIterator | JSON array containing URIs pointing to user scripts, supported protocols: file:// |
| (property).uris[#] | string |
{
"jsonrpc": 2.0,
"id": 20,
"method": "org.rdk.WebKitBrowser.userScripts"
}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
{
"jsonrpc": 2.0,
"id": 20,
"result": [
""
]
}{
"jsonrpc": 2.0,
"id": 20,
"method": "org.rdk.WebKitBrowser.userScripts",
"params": [
""
]
}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
{
"jsonrpc": 2.0,
"id": 20,
"result": null
}User style sheets used by the browser
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).uris | IStringIterator | JSON array containing URIs pointing to user scripts, supported protocols: file:// |
| (property).uris[#] | string |
{
"jsonrpc": 2.0,
"id": 21,
"method": "org.rdk.WebKitBrowser.userStyleSheets"
}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
{
"jsonrpc": 2.0,
"id": 21,
"result": [
""
]
}{
"jsonrpc": 2.0,
"id": 21,
"method": "org.rdk.WebKitBrowser.userStyleSheets",
"params": [
""
]
}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
{
"jsonrpc": 2.0,
"id": 21,
"result": null
}Browser window visibility state
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).visible | string | Visiblity state (e.g. ) |
{
"jsonrpc": 2.0,
"id": 22,
"method": "org.rdk.WebKitBrowser.visibility"
}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
{
"jsonrpc": 2.0,
"id": 22,
"result": {
"visible": "HIDDEN"
}
}{
"jsonrpc": 2.0,
"id": 22,
"method": "org.rdk.WebKitBrowser.visibility",
"params": {
"visible": "HIDDEN"
}
}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
{
"jsonrpc": 2.0,
"id": 22,
"result": null
}URI of the associated application-specific content
This property is write-only.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).link | string | Content URI (e.g. https://youtube.com) |
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.WebKitBrowser.contentLink",
"params": {
"link": ""
}
}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
{
"jsonrpc": 2.0,
"id": 2,
"result": null
}Application-specific identification string
This property is read-only.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).id | string | Identifier string |
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.WebKitBrowser.identifier"
}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
{
"jsonrpc": 2.0,
"id": 3,
"result": {
"id": ""
}
}Current application user interface language
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).language | string | Language string as per RFC5646 (e.g. en) |
{
"jsonrpc": 2.0,
"id": 4,
"method": "org.rdk.WebKitBrowser.language"
}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
{
"jsonrpc": 2.0,
"id": 4,
"result": {
"language": ""
}
}{
"jsonrpc": 2.0,
"id": 4,
"method": "org.rdk.WebKitBrowser.language",
"params": {
"language": ""
}
}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
{
"jsonrpc": 2.0,
"id": 4,
"result": null
}Application launching point
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).point | string |
{
"jsonrpc": 2.0,
"id": 5,
"method": "org.rdk.WebKitBrowser.launchPoint"
}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
{
"jsonrpc": 2.0,
"id": 5,
"result": {
"point": "UNDEFINED"
}
}{
"jsonrpc": 2.0,
"id": 5,
"method": "org.rdk.WebKitBrowser.launchPoint",
"params": {
"point": "UNDEFINED"
}
}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
{
"jsonrpc": 2.0,
"id": 5,
"result": null
}Current application visibility
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| (property).visiblity | bool |
{
"jsonrpc": 2.0,
"id": 6,
"method": "org.rdk.WebKitBrowser.visible"
}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
{
"jsonrpc": 2.0,
"id": 6,
"result": {
"visiblity": true
}
}{
"jsonrpc": 2.0,
"id": 6,
"method": "org.rdk.WebKitBrowser.visible",
"params": {
"visiblity": true
}
}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
{
"jsonrpc": 2.0,
"id": 6,
"result": null
}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 |
Notifies that cookies were added, removed or modified.
This method takes no parameters.
{
"jsonrpc": 2.0,
"id": 5,
"method": "org.rdk.WebKitBrowser.cookieJarChanged"
}Browser failed to load page
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.URL | string | The URL that has been loaded (e.g. https://example.com) |
{
"jsonrpc": 2.0,
"id": 6,
"method": "org.rdk.WebKitBrowser.loadFailed",
"params": {
"URL": ""
}
}Initial HTML document has been completely loaded and parsed
| 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) |
{
"jsonrpc": 2.0,
"id": 7,
"method": "org.rdk.WebKitBrowser.loadFinished",
"params": {
"URL": "",
"httpstatus": 0
}
}Notifies that the web page requests to close its window
This method takes no parameters.
{
"jsonrpc": 2.0,
"id": 8,
"method": "org.rdk.WebKitBrowser.pageClosure"
}Signals a URL change in the browser
| 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) |
{
"jsonrpc": 2.0,
"id": 9,
"method": "org.rdk.WebKitBrowser.uRLChange",
"params": {
"URL": "",
"loaded": true
}
}Application visibility changes
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.hidden | bool | Denotes if application is currently hidden |
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.WebKitBrowser.visibilityChange",
"params": {
"hidden": true
}
}