Re: Target, or opening a new instance of UA with a link

Ben Bucksch, at 22:16 +0100 on 2002-02-25, wrote:

> IMO, JS is by far the worst of all options. Not only is JS
> onmouseclick="window.open()" even more presentational than a
> target=_blank, it also has major security problems and is much harder to
> separate from other code.

Yes, using JS does make it more presentational, but that's largely the
point of much JS.  We aren't trying to get rid of presentational stuff,
just separate it away from the semantic markup (e.g., XHTML).

I agree with the security problems; I'm not in *favor* of using JS for
most things.  I just think that in this case the desired behaviour is best
implemented currently in JS.  I would *prefer* that it be implemented in a
more declarative language, such as CSS.

> Nothing in HTML forces you to anything. It is trivial to ignore the
> target attribute, and Mozilla has a (hidden?) pref to do just that. (But
> it still works with frames, IIRC.)

Of course, this is a great idea too (other than simply rejecting invalid
XHTML because it uses the a[target]).  I wasn't aware of this option, but
have now found it and put it into my user.js:

pref("browser.target_new_blocked", true);

It was Mozilla Bugzilla bug 56296.  Thanks for the heads up on that :)

> Mozilla does not actually give you control, and it is very hard to
> implement properly. See
> <http://bugzilla.mozilla.org/show_bug.cgi?id=64560>.

By giving control, I mean by allowing me to disable most undesirable
features, such as being able to open unrequested windows (e.g., on
load/close), change status bar text, manipulate cookies, etc.  The
window.open() problem still exists, however, as you note.

-- 
Frank Tobin		http://www.neverending.org/~ftobin/

Received on Monday, 25 February 2002 16:53:02 UTC