Changeset 20897
- Timestamp:
- 05/25/2012 04:19:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/customize-base.dev.js
r20886 r20897 483 483 484 484 initialize: function( url, targetWindow, options ) { 485 // Target the parent frame by default, but only if a parent frame exists. 486 var defaultTarget = window.parent == window ? null : window.parent; 487 485 488 $.extend( this, options || {} ); 486 489 487 490 url = this.add( 'url', url ); 488 this.add( 'targetWindow', targetWindow || window.parent );491 this.add( 'targetWindow', targetWindow || defaultTarget ); 489 492 this.add( 'origin', url() ).link( url ).setter( function( to ) { 490 493 return to.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ); … … 504 507 event = event.originalEvent; 505 508 509 if ( ! this.targetWindow() ) 510 return; 511 506 512 // Check to make sure the origin is valid. 507 513 if ( this.origin() && event.origin !== this.origin() ) … … 519 525 data = typeof data === 'undefined' ? {} : data; 520 526 521 if ( ! this.url() )527 if ( ! this.url() || ! this.targetWindow() ) 522 528 return; 523 529
Note: See TracChangeset
for help on using the changeset viewer.