keep javascript from changing window properties

Leo Savernik l.savernik at aon.at
Fri Oct 11 14:25:06 BST 2002


Am Donnerstag, 10. Oktober 2002 23:10 schrieb Martijn Klingens:
> On Thursday 10 October 2002 22:36, Leo Savernik wrote:
> > Besides of that, I'm not the only one who thinks so. Mozilla, for
> > example, provides the following options under
> > Preferences/Advanced/Scripts & Plugins for a fairly long time:
> > - open unrequested windows
>
> Doesn't Konq have the 'JavaScript Web Popups Policy' in the settings since
> quite a while too? AFAIK at least since KDE 3.0.
>
Yep, indeed. My patch doesn't touch those because they work perfectly well for 
me. I only used the implementation of the window.open code as a template for 
the other properties.

> The rest of your wish indeed makes sense under an advanced button, because
> the behaviour you describe is often rather annoying. I personally would
> make it similar to the current popup window code though that besides allow
> and deny there is also 'smart' that only allows it as a result of a mouse
> click or keyboard event, but not at random, leaving more advanced apps
> intact, but killing the ads and other spam.
>
I think that would be overkill to provide a yes/no/ask/smart policy for simple 
actions like window.resizeXX window.moveXX window.[default]status because 
they *cannot* break pages by simply doing nothing. My patch doesn't work like 
mozilla where denying window resize/move meant throwing a JS security 
exception effectively killing the script which indeed broke existing pages 
(but I think they have fixed it by now).

> As for the correctness of the patch, I know too little about the ecma
> bindings, so I leave that for the Konq developers.





More information about the kfm-devel mailing list