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

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

Issue 2127063003: Avoid the use of foreach on NodeList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/init_document.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js
index f547f3c77eec6d7b2bf4c553441f4ce020556c34..c2be9ed1b254f105a6d678fdd139756c2eb4468c 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js
@@ -86,13 +86,13 @@ cvox.ChromeVox.initDocument = function() {
// Look for ChromeVox-specific meta attributes.
var disableContentScript = false;
if (document.head) {
- document.head.querySelectorAll('meta[name="chromevox"]').forEach(
- function(meta) {
- var contentScript = meta.getAttribute('content-script');
- if (contentScript && contentScript.toLowerCase() == 'no') {
- disableContentScript = true;
- }
- });
+ var metaNodes = document.head.querySelectorAll('meta[name="chromevox"]');
+ for (var i = 0, meta; meta = metaNodes[i]; i++) {
+ var contentScript = meta.getAttribute('content-script');
+ if (contentScript && contentScript.toLowerCase() == 'no') {
+ disableContentScript = true;
+ }
+ }
}
if (disableContentScript) {
var url = location.href;
« 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