When the source of an iframe is:
what does the "path_src" do?
It tells the browser to display the result of executing the empty string literal. Therefore, it would just display an empty string.
You can test the effect of this by typing in
This is the reason that bookmarklets often wrap the code inside
void() or an anonymous function that doesn't return anything to stop the browser from trying to display the result of executing the bookmarklet. For example:
If you directly use code that returns something (a new window instance in this case), the browser will end up displaying that:
In Firefox the above will display:
To the best of my knowledge the
src attribute maps to the
location.href. So setting
Either way you accomplish very little. Is this code you inherited or are you trying to do something tricky with the
©2020 All rights reserved.