diff options
author | Andrew Dolgov <[email protected]> | 2021-02-19 07:38:11 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-19 07:38:11 +0300 |
commit | 21b3595c8fc71aaa869fe0e50c910e54851e39e7 (patch) | |
tree | 06bfbbf81e835485837dd608fdb6512a349d952d | |
parent | e24b5ac5785c3c3bff23dd7d367e1f6fd1982999 (diff) |
fix for lack of prototype
-rw-r--r-- | init.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,14 +1,14 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { ready(function () { - Event.observe(window, "focus", function() { - $$("video").forEach((vid) => { + window.addEventListener("focus", function() { + App.findAll("video").forEach((vid) => { if (vid.getAttribute("autoplay") == 1 && vid.paused) vid.play(); }) }); - Event.observe(window, "blur", function() { - $$("video").forEach((vid) => { + window.addEventListener("blur", function() { + App.findAll("video").forEach((vid) => { if (vid.getAttribute("autoplay") == 1 && !vid.paused) vid.pause(); }) |