keep javascript from changing window properties
Leo Savernik
l.savernik at aon.at
Thu Oct 10 21:36:19 BST 2002
Hello,
Well, given the fact that not even kde 3.1 has been released, it might be a
little early for kde 3.2 wishlist items, but I think its potential massive
relief onto the web surfing experience justifies that -- as inconspicuous as
it might seem.
The idea is about keeping khtml's ecma bindings from changing some properties
of the window object, namely
focus()
moveTo()
moveBy()
resizeTo()
resizeBy()
defaultStatus
status
That will keep some pages from resizing my carefully sized window or to move
it to another position. I also can't stand those pages which pop into the
foreground unexpectedly and interrupt my workflow and which think that they
are smarter than me for not letting me see the real url of links in the
status bar.
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
- move or resize existing windows
- raise or lower windows
- change status line text
- (and some more which I don't care so I'm not mentioning them here)
Given the fact that an implementation seems to be easy, I'd really like to see
this included in kde 3.2. Can I get that on the 3.2 feature plan somehow?
Ah, before I forget, I certainly created a proof of concept implementation
against KDE-CVS of two weeks ago. Its patch is attached below, it still seems
to apply unchanged to today's CVS as far as lxr.kde.org tells me.
This patch merely imitates the handling for window.open() and introduces four
new boolean configuration settings under "Java/Javascript Settings"
WindowFocus
WindowStatus
WindowResize
WindowMove
which default to true meaning that the write-access to the property resp. the
invocation of the function is granted. Setting any of these to false
immediately disables changes (making them effectively no-op).
So there is no plea not to have this feature in Konqueror, though I'm
certainly not insisting that *my* patch is incorporated. Any implementation
that fulfills my needs will make me happy :-)
mfg
Leo Savernik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kjs_window.cpp.diff
Type: text/x-diff
Size: 4003 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20021010/ef14d7d1/attachment.diff>
More information about the kfm-devel
mailing list