Development :  K-Meleon Forum
K-Meleon development related discussions. 
Tabs can be scripted?
Posted by: sven
Date: April 04, 2002 10:33AM

Okay, some of us love tabs (I do) and some hate 'em. Since developers won't do it we have to do it ourselves.

I've given the matter some thought lately and I think sort-of-tabs can be faked. We need to mix some DOM (which KM supports nicely) and some clever javascript (which we can write, right?).

As I see there are two possible solutions to that kind of problem.

1) We can fake it with frames. Have one controlling frame where you load "tabs" and build javascript which hides and displays frames dynamically. You can load dodument into frame, then hide the frame, dislay another frame and then switch back to first frame and hide the second one. In IE this works like a charm, in Mozilla it doesn't. The problem is that Mozilla wants to reload *all* frames when changing their size dynamically. IE doesn't. Unless Mozilla engine gets fixed for this bug - I'd calle it a bug - we can't use it on KM.

2) You can read and write frame contents arbitrarily if you give your script needed rights (, you can store a content somewhere and replace it with another. You can replace the content of a frame or window dynamically. The problem here is that current KM doesn't understand securitymanager functions at all. New beta does, at least when I tested it for this.

I make no claims of whatsoever about the practical use of above methods. It's just an idea. I have only done preliminary tests. Because of my lack of time to start testing and working on this myself I'm passing the idea here to anybody who would be interested to give a try.

You need to be able to write Javascript and you need to know at least some DOM. If you've messed around with DOM in Mozilla before then do take those ideas further, experiment and test. Perhaps it won't work. Perhaps it'd be buggy. But perhaps we can get something out of this.

As stated before, I will not be able to engage in new projects anytime soon but I can share knowledge or ideas that I have.

Options: ReplyQuote
Re: Tabs can be scripted?
Posted by: PeteCool
Date: April 04, 2002 11:51PM

This looks doable, but it is too much of a hack IMO. Doing it with a plugin using MFC would be much cleaner and most probably merged with the main program by the authors if done right. It is possible to use MFC to make mozilla tabs, take a look at Scope (, the author might even want to let you have the code, since he doesn't seem to do any more development on it.

I would definitely prefer an MFC plugin, though your way might be okay too.


Options: ReplyQuote

K-Meleon forum is powered by Phorum.