Answer the question
In order to leave comments, you need to log in
Is this code crossbrowser?
there is a main window
and there is an iframe inside it,
the script inside the iframe checks if the urls match
if(decodeURIComponent(window.location) === decodeURIComponent(top.айфрейм.src) + '/')
Answer the question
In order to leave comments, you need to log in
And what about the browser?
See source code and server operation.
If you have src without a slash in your iframe, and adding a slash is installed on the server, then this is the only way it will work.
Because window.loation is overwritten when you visit the page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question