Skip to content

Commit beab3ba

Browse files
committed
chore(jqLite): remove the ready handlers instead of setting a flag
This change aligns jqLite with the jQuery implementation. Closes angular#15237
1 parent e008df6 commit beab3ba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/jqLite.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,9 @@ function jqLiteDocumentLoaded(action, win) {
522522
}
523523

524524
function jqLiteReady(fn) {
525-
var fired = false;
526-
527525
function trigger() {
528-
if (fired) return;
529-
fired = true;
526+
window.document.removeEventListener('DOMContentLoaded', trigger);
527+
window.removeEventListener('load', trigger);
530528
fn();
531529
}
532530

0 commit comments

Comments
 (0)