Get iframe src param from inside the iframe itself
You're looking for document.location
, just like any other document.
Each frame gets its own document
.
If allowed by cross-domain checks, try window.frameElement.src
. Otherwise, you are out of luck and left alone with location.href
.