Skip to content

Commit

Permalink
Merge pull request #1476 from kinglozzer/1469-onmatch-early
Browse files Browse the repository at this point in the history
FIX: Delay entwine onmatch until DOMContentLoaded (fixes #1469)
  • Loading branch information
GuySartorelli authored Mar 17, 2023
2 parents 8740b5e + 1bade6a commit 1152031
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/vendor.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions thirdparty/jquery-entwine/jquery.entwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1382,17 +1382,18 @@ Sizzle is good for finding elements for a selector, but not so good for telling
$(document).triggerHandler(event);
});

})(jQuery);;
})(jQuery);


/* src/domevents/jquery.entwine.domevents.maybechanged.js */

(function($){

/** What to call to run a function 'soon'. Normally setTimeout, but for syncronous mode we override so soon === now */
var runSoon = window.setTimeout;
// Helper to run a function "soon". In "synchronous" mode this is overridden so soon === now, but by default this uses
// setTimeout wrapped in $() (shorthand for $(document).ready()) to ensure it never runs before DOMContentLoaded
var runSoon = (fn, delay) => $(_ => window.setTimeout(fn, delay));

/** The timer handle for the asyncronous matching call */
/** The timer handle for the asynchronous matching call */
var ChangeDetails = Base.extend({

init: function() {
Expand Down

0 comments on commit 1152031

Please sign in to comment.