for ( i = 0; i < iframes.length; i++ ) {
source = iframes[ i ];
- if ( source.getAttribute( 'data-secret' ) ) {
- continue;
+ if ( ! source.getAttribute( 'data-secret' ) ) {
+ /* Add secret to iframe */
+ secret = Math.random().toString( 36 ).substr( 2, 10 );
+ source.src += '#?secret=' + secret;
+ source.setAttribute( 'data-secret', secret );
}
- /* Add secret to iframe */
- secret = Math.random().toString( 36 ).substr( 2, 10 );
- source.src += '#?secret=' + secret;
- source.setAttribute( 'data-secret', secret );
-
/* Remove security attribute from iframes in IE10 and IE11. */
if ( ( isIE10 || isIE11 ) ) {
iframeClone = source.cloneNode( true );