Changeset 37977
- Timestamp:
- 07/05/2016 04:15:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/wp-embed-template.js
r37745 r37977 27 27 share_input = document.querySelectorAll( '.wp-embed-share-input' ), 28 28 share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ), 29 featured_image = document.querySelector( '.wp-embed-featured-image img' ), 29 30 i; 30 31 … … 140 141 141 142 // Send the document's height again after the featured image has been loaded. 142 document.querySelector( '.wp-embed-featured-image img' ).addEventListener( 'load', function() { 143 sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); 144 } ); 143 if ( featured_image ) { 144 featured_image.addEventListener( 'load', function() { 145 sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); 146 } ); 147 } 145 148 146 149 /**
Note: See TracChangeset
for help on using the changeset viewer.