Commit 4720b305 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

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: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659246}
parent e218920e
......@@ -106,5 +106,14 @@
"48": "images/chromevox-48.png",
"128": "images/chromevox-128.png"
},
"content_security_policy": "default-src 'none'; script-src 'self' chrome://resources; style-src 'unsafe-inline' chrome://resources;"
}
"content_security_policy": "default-src 'none'; script-src 'self' chrome://resources; style-src 'unsafe-inline' chrome://resources;",
"externally_connectable": {
"ids": [
// Allow connections with js2at (name may change) project, which allows
// web pages and ChromeVox to exchange messages that conform to
// a set of approved schemas. 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.
"jpgoldinadnmhfknenolkgbnockemnid"
]
}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment