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

Unified Diff: ui/webui/resources/js/cr.js

Issue 2921783003: WebUI: Fix/suppress some existing violations of no-restricted-globals. (Closed)
Patch Set: Fix svg Created 3 years, 6 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
Index: ui/webui/resources/js/cr.js
diff --git a/ui/webui/resources/js/cr.js b/ui/webui/resources/js/cr.js
index c18569508986426839993c39c68b3008ad68c6b9..8cc812455afdbbda23e96c9946b96efdaeb50c4d 100644
--- a/ui/webui/resources/js/cr.js
+++ b/ui/webui/resources/js/cr.js
@@ -310,8 +310,12 @@ var cr = cr || function() {
function makePublic(ctor, methods, opt_target) {
methods.forEach(function(method) {
ctor[method] = function() {
- var target = opt_target ? document.getElementById(opt_target) :
- ctor.getInstance();
+ var target = opt_target ?
+ // Disable document.getElementById restriction since cr.js should
+ // not depend on util.js.
+ // eslint-disable-next-line no-restricted-properties
+ document.getElementById(opt_target) :
+ ctor.getInstance();
return target[method + '_'].apply(target, arguments);
};
});
« no previous file with comments | « chrome/browser/resources/print_preview/settings/other_options_settings.js ('k') | ui/webui/resources/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698