Changeset 44795
- Timestamp:
- 03/05/2019 02:13:25 AM (6 years ago)
- Location:
- branches/5.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
-
branches/5.1/src/js/_enqueues/lib/comment-reply.js
r44751 r44795 33 33 * !! sets the variable to true if the property exists. 34 34 */ 35 var supportsDataset = !! document. body.dataset;35 var supportsDataset = !! document.documentElement.dataset; 36 36 37 37 // For holding the cancel element. … … 47 47 var observer; 48 48 49 // Initialise the events. 50 init(); 51 52 // Set up a MutationObserver to check for comments loaded late. 53 observeChanges(); 49 if ( cutsTheMustard && document.readyState !== 'loading' ) { 50 ready(); 51 } else if ( cutsTheMustard ) { 52 window.addEventListener( 'DOMContentLoaded', ready, false ); 53 } 54 55 /** 56 * Sets up object variables after the DOM is ready. 57 * 58 * @since 5.1.1 59 */ 60 function ready() { 61 // Initialise the events. 62 init(); 63 64 // Set up a MutationObserver to check for comments loaded late. 65 observeChanges(); 66 } 54 67 55 68 /** … … 163 176 postId = getDataAttribute( replyLink, 'postid'), 164 177 follow; 178 179 if ( ! commId || ! parentId || ! respondId || ! postId ) { 180 /* 181 * Theme or plugin defines own link via custom `wp_list_comments()` callback 182 * and calls `moveForm()` either directly or via a custom event hook. 183 */ 184 return; 185 } 165 186 166 187 /*
Note: See TracChangeset
for help on using the changeset viewer.