Ticket #34698: 34698.2.diff
| File 34698.2.diff, 1.6 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/js/wp-embed.js
1 1 (function ( window, document ) { 2 2 'use strict'; 3 3 4 var supportedBrowser = ( document.querySelector && window.addEventListener ),4 var supportedBrowser = false, 5 5 loaded = false; 6 6 7 if ( document.querySelector ) { 8 if ( window.addEventListener ) { 9 supportedBrowser = true; 10 } 11 } 12 7 13 window.wp = window.wp || {}; 8 14 9 15 if ( !! window.wp.receiveEmbedMessage ) { … … 50 56 targetURL.href = data.value; 51 57 52 58 /* Only continue if link hostname matches iframe's hostname. */ 53 if ( targetURL.host === sourceURL.host && document.activeElement === source ) { 54 window.top.location.href = data.value; 59 if ( targetURL.host === sourceURL.host ) { 60 if ( document.activeElement === source ) { 61 window.top.location.href = data.value; 62 } 55 63 } 56 64 } 57 65 } … … 85 93 } 86 94 87 95 /* Remove security attribute from iframes in IE10 and IE11. */ 88 if ( ( isIE10 || isIE11 ) && !!source.getAttribute( 'security' ) ) { 89 iframeClone = source.cloneNode( true ); 90 iframeClone.removeAttribute( 'security' ); 91 source.parentNode.replaceChild( iframeClone, source ); 96 if ( ( isIE10 || isIE11 ) ) { 97 if ( !!source.getAttribute( 'security' ) ) { 98 iframeClone = source.cloneNode( true ); 99 iframeClone.removeAttribute( 'security' ); 100 source.parentNode.replaceChild( iframeClone, source ); 101 } 92 102 } 93 103 } 94 104 }