preventing frame breakout

N

Nathan White

I am writing a Firefox plugin and want to be able to prevent frame
breakouts. I tried to capture the unload and beforeunload events and
prevent the event from firing. It is not possible to stop the url from
changing once these events have been fired. The typical frame breakout
script looks like:

if (top.location != location) {
top.location.href = document.location.href ;
}

Does anyone know of any way to prevent this from taking over the
parent? I don't care if it uses a browser specific feature or even if
it requires specific security settings enabled. I just want to know if
its possible and if so how.

One thought I had is to attach a script to the frame that overloads the
"top" object and capture anything pass. If this could work any ideas on
how to attach a script to a loading frame that executes before anything
else?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top