Changeset 35708 for trunk/src/wp-includes/js/wp-embed.js
- Timestamp:
- 11/19/2015 11:05:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/wp-embed.js
r35577 r35708 2 2 'use strict'; 3 3 4 var supportedBrowser = ( document.querySelector && window.addEventListener ),4 var supportedBrowser = false, 5 5 loaded = false; 6 7 if ( document.querySelector ) { 8 if ( window.addEventListener ) { 9 supportedBrowser = true; 10 } 11 } 6 12 7 13 window.wp = window.wp || {}; … … 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 } … … 78 86 source.style.display = ''; 79 87 80 if ( !source.getAttribute( 'data-secret' ) ) { 81 /* Add secret to iframe */ 82 secret = Math.random().toString( 36 ).substr( 2, 10 ); 83 source.src += '#?secret=' + secret; 84 source.setAttribute( 'data-secret', secret ); 88 if ( source.getAttribute( 'data-secret' ) ) { 89 continue; 85 90 } 86 91 92 /* Add secret to iframe */ 93 secret = Math.random().toString( 36 ).substr( 2, 10 ); 94 source.src += '#?secret=' + secret; 95 source.setAttribute( 'data-secret', secret ); 96 87 97 /* Remove security attribute from iframes in IE10 and IE11. */ 88 if ( ( isIE10 || isIE11 ) && !!source.getAttribute( 'security' )) {98 if ( ( isIE10 || isIE11 ) ) { 89 99 iframeClone = source.cloneNode( true ); 90 100 iframeClone.removeAttribute( 'security' );
Note: See TracChangeset
for help on using the changeset viewer.