Embeds: Only display an iframe when it was successfully loaded.
This prevents showing a blank iframe by first checking if a message was successfully received from it. Fixes #35894. git-svn-id: https://develop.svn.wordpress.org/trunk@36648 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
245e40f384
commit
3039740a3a
@ -86,21 +86,16 @@
|
||||
if ( loaded ) {
|
||||
return;
|
||||
}
|
||||
|
||||
loaded = true;
|
||||
|
||||
var isIE10 = -1 !== navigator.appVersion.indexOf( 'MSIE 10' ),
|
||||
isIE11 = !!navigator.userAgent.match( /Trident.*rv:11\./ ),
|
||||
iframes = document.querySelectorAll( 'iframe.wp-embedded-content' ),
|
||||
blockquotes = document.querySelectorAll( 'blockquote.wp-embedded-content' ),
|
||||
iframeClone, i, source, secret;
|
||||
|
||||
for ( i = 0; i < blockquotes.length; i++ ) {
|
||||
blockquotes[ i ].style.display = 'none';
|
||||
}
|
||||
|
||||
for ( i = 0; i < iframes.length; i++ ) {
|
||||
source = iframes[ i ];
|
||||
source.style.display = '';
|
||||
|
||||
if ( source.getAttribute( 'data-secret' ) ) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user