Allow connections with js2at
Js2at is a project that allows web pages and ChromeVox to exchange messages that conform to a set of approved schemas, and can allow page behavior to be customized. Note: js2at is currently built as an extension. If it is ever built into the browser the connection mechanism may change, and this line may no longer be necessary. The following code connects to js2at: chrome.runtime.onConnectExternal.addListener((port) => { if (port.name === 'js2at->cvox') { /* Do something */ } }); js2atPort.onMessage.addEventLister(receiveMessageCallback); js2atPort.postMessage(messageToSend); Bug: None Change-Id: I5d662c641d6534d6c02bb2777ae13c0a3a725dfa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610477Reviewed-by:David Tseng <dtseng@chromium.org> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#659246}
Showing
Please register or sign in to comment