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 16, 2023
1 parent 8740b5e commit bef5379
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

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 function to run a function "soon". This is effectively using setTimeout, but ensuring it doesn't run
// before DOMContentLoaded (via jQuery.ready())
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 bef5379

Please sign in to comment.