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

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

Issue 2921783003: WebUI: Fix/suppress some existing violations of no-restricted-globals. (Closed)
Patch Set: More Created 3 years, 7 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..661e5423df07f2c822220aa370488fb6bba3aeda 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() {
+ // Disable document.getElementById restriction since cr.js should not
+ // depend on util.js.
+ /* eslint-disable no-restricted-properties */
var target = opt_target ? document.getElementById(opt_target) :
ctor.getInstance();
+ /* eslint-enable no-restricted-properties */
return target[method + '_'].apply(target, arguments);
};
});

Powered by Google App Engine
This is Rietveld 408576698