user670324
user670324

Reputation: 235

Closing the main window of the browser

I'm using a WebKit-based browser (OWB) and I would like to close the browser by using a JavaScript function call. It seems that window.close closes windows created by another window only (i.e. windows with parents) . It is possible to make a plugin for calling exit and kill the browser process, but this solution causes memory leak and unexpected behavior. I don't know if there is a function for this in ECMA standard, but maybe there can be one in WebKit API. Is there a function that I could use to close the main window (without any parent) of browser?

Upvotes: 0

Views: 593

Answers (1)

Jan
Jan

Reputation: 8141

It's not possible, How would you like it if random sites can close your browser at will? I would definitely be looking for another browser. Can you explain why you need this (very annoying) behavior? I bet there are very good alternatives, from a usability perspective, to what you want to achieve.

As a side-note: WebKit is a HTML rendering engine and has in fact very little to do with javascript.

Upvotes: 4

Related Questions