summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-18 22:26:00 +0300
committerAndrew Dolgov <[email protected]>2021-02-18 22:26:00 +0300
commitb6c3dde1cca77fd6e024b5ddc56dd25e600353ba (patch)
treed5ceb516c382849f66c10a2259d9c72764dd5cea /js/common.js
parentc088e9d9d8296fe154763da3b5297bf85c3cc3a1 (diff)
add $/423 shims
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/common.js b/js/common.js
index 74353c123..9275bd09f 100755
--- a/js/common.js
+++ b/js/common.js
@@ -3,6 +3,17 @@
/* global dijit, __, App, Ajax */
/* eslint-disable no-new */
+function $(id) {
+ console.warn("FIXME: please use App.getById() or document.getElementById() instead of $():", id);
+ return document.getElementById(id);
+}
+
+function $$(query) {
+ console.warn("FIXME: please use App.findAll() or document.querySelectorAll() instead of $():", query);
+ return document.querySelectorAll(query);
+}
+
+
Element.prototype.hasClassName = function(className) {
return dojo.hasClass(this, className);
};