Skip to content

Commit

Permalink
FIX: Delay entwine onmatch until DOMContentLoaded (fixes silverstripe…
Browse files Browse the repository at this point in the history
  • Loading branch information
kinglozzer committed Mar 17, 2023
1 parent 8740b5e commit 1bade6a
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 1bade6a

Please sign in to comment.