chore(jqLite): remove the ready handlers instead of setting a flag
This change aligns jqLite with the jQuery implementation. Closes #15237
This commit is contained in:
+2
-4
@@ -522,11 +522,9 @@ function jqLiteDocumentLoaded(action, win) {
|
||||
}
|
||||
|
||||
function jqLiteReady(fn) {
|
||||
var fired = false;
|
||||
|
||||
function trigger() {
|
||||
if (fired) return;
|
||||
fired = true;
|
||||
window.document.removeEventListener('DOMContentLoaded', trigger);
|
||||
window.removeEventListener('load', trigger);
|
||||
fn();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user