We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbf6ec2 commit d4523cbCopy full SHA for d4523cb
1 file changed
styles/all/template/update_worker.js
@@ -12,12 +12,14 @@ function webpushWorkerUpdate() {
12
});
13
}
14
15
-
16
-function domReady(callBack) {
17
- if (document.readyState === 'loading') {
18
- document.addEventListener('DOMContentLoaded', callBack);
19
- } else {
20
- callBack();
+// Do not redeclare function if exist
+if (typeof domReady === 'undefined') {
+ window.domReady = function(callBack) {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callBack);
+ } else {
21
+ callBack();
22
+ }
23
24
25
0 commit comments