Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2974)

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js

Issue 2746433004: Re-enable support for Math in ChromeVox Next (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
index aa6d2041156af46ee53e7a3910e8fae41cf196f8..ee366e312521a038ba2180f0a8d6bef52f697750 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
@@ -129,6 +129,23 @@ if (typeof(goog) != 'undefined' && goog.require) {
};
+ /**
+ * Maybe enable MathJaX support.
+ */
+ function maybeEnableMathJaX() {
+ if (!MathJax || !MathJax.Hub || !MathJax.Hub.Register ||
+ !MathJax.Hub.Register.LoadHook)
+ return;
+
+ MathJax.Hub.Register.LoadHook(
+ '[a11y]/explorer.js',
+ function() {
+ MathJax.Extension.explorer.Enable(true, true);
+ });
+ MathJax.Ajax.Require('[a11y]/explorer.js');
+ }
+
+
/*
* Public API.
*/
@@ -164,6 +181,7 @@ if (typeof(goog) != 'undefined' && goog.require) {
*/
cvox.Api.internalEnable = function() {
isActive_ = true;
+ maybeEnableMathJaX();
if (!implementation) {
connect_();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698