diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-13 15:32:17 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-13 15:32:17 +0200 |
commit | 0d250489ebe5570e1e2e8d23c9c2fda437b36f4a (patch) | |
tree | bcde8b7ff9ea7555841a8378b3c3a4f11c1d77d4 /static/script.js | |
parent | JS Move eventCreation functions into class. (diff) | |
download | calp-0d250489ebe5570e1e2e8d23c9c2fda437b36f4a.tar.gz calp-0d250489ebe5570e1e2e8d23c9c2fda437b36f4a.tar.xz |
Javascript use strict.
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js index e6df3e0c..58642b09 100644 --- a/static/script.js +++ b/static/script.js @@ -1,3 +1,5 @@ +'use strict'; + function makeElement (name, attr={}) { let element = document.createElement(name); for (let [key, value] of Object.entries(attr)) { @@ -471,7 +473,7 @@ function bind_properties (el) { let field = child.tagName; - lst = el.properties["_slot_" + field] = [] + let lst = el.properties["_slot_" + field] = [] for (let s of el.getElementsByClassName(field)) { let f = ((s, v) => s.innerHTML = v.format(s.dataset && s.dataset.fmt)); lst.push([s, f]); |