If you try to read the location.hrefcross-domain iframe / window property , this will throw an exception because it violates a policy of the same origin. You can write for this property, but you cannot read . And even if that works, you will have a problem with multiple iframes with the same url problem you guessed it.
, - - . , iframe, X, iframe " X?" . , , , iframe , .
, , , , (event.source)? - , .