When I access top.location.hostname
through a userscript or Firefox add-on, I get the following in the Error Console:
Error: Permission denied to access property 'hostname'
What is the problem with this and how to over come?
Edit:
alert(location.hostname)
gives multiple alerts for a single webpage (may be, because of frames in a page).
So, I tried with top.location.hostname
. It is giving correct output but with an error in error console. How to skip the error?