On 2008-10-11 17:46, Csaba Gabor wrote:
Quote:
|
In my Firefox 1.5 (on Win XP Pro) a <BR>
|
FF 1.5 really shouldn't be used anymore, except for compatibility
testing. I would understand version 2.x (some people can't run 3.x
because of missing libraries), but 1.5 is ancient.
After reading that bug report, and the specs, it looks like that's the
correct and expected behavior. Inconvenient, maybe, but at least it's
consistent.
Quote:
Boris suggests doing something else to get what
I believe most users are really after, but doesn't
say what.
|
(for reference)
| Comment #5 From Boris Zbarsky:
| [..] If you want an actual serialization, instead of just the
| textContent, you need to use something else.
I suppose he was talking about something similar to what you've done
with "innerText".
Quote:
HTMLBRElement.prototype.__defineGetter__("innerTex t",
function() {return "\n";});
|
Using "innerText" as a getter name is a dubious choice for Firefox.
AFAIK, they still haven't implemented innerText in their DOM
implementation (in contrast to innerHTML), but they might do so in the
future, and then you'll get errors. You should also be aware that the
getter/setter behavior has changed in more recent versions of Firefox:
| Prior to Firefox 3.0, getter and setter are not supported for DOM
| Elements. Older versions of Firefox silently fail. If exceptions are
| needed for those, changing the prototype of HTMLElement
| (HTMLElement.prototype.__define[SG]etter__) and throwing an
| exception is a workaround.
| With Firefox 3.0, defining getter or setter on an already-defined
| property will throw an exception. The property has to be deleted
| beforehand, what is not the case for older versions of Firefox.
<http://preview.tinyurl.com/4wk75y>
Quote:
Thanks,
Csaba Gabor from Vienna
|
Greetings to Vienna,
- Conrad