Skip to content

Commit c58b04c

Browse files
committed
jQuery watcher code
1 parent 750846e commit c58b04c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

lib/jquery-watcher-code.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* See license.txt for terms of usage */
2+
3+
"use strict";
4+
5+
module.metadata = {
6+
"stability": "stable"
7+
};
8+
9+
/**
10+
* xxxHonza TODO docs
11+
*/
12+
const jQueryWatcherCode = "\
13+
(function() {\
14+
var timerId = setInterval(function() {\
15+
if (window.jQuery) {\
16+
clearInterval(timerId);\
17+
var event = document.createEvent('Events');\
18+
event.initEvent('jQueryDetected', true, false);\
19+
document.dispatchEvent(event);\
20+
}\
21+
}, {{watcherInterval}});\
22+
})();\
23+
";
24+
25+
// Exports from this module
26+
exports.jQueryWatcherCode = jQueryWatcherCode;

0 commit comments

Comments
 (0)