Open Bug 205915 Opened 18 years ago Updated 2 years ago

Javascript does not read unsupported attributes

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: 3.14, Unassigned)

References

()

Details

http://www.thai-classic.com/menu.htm is an example of a rollover created by
MS-Frontpage. Yes, this is really stupid, it includes a local file and has empty
functions etc. But this is all not relevant for this problem. This is what happens:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030514
(built from source of 05/13/03 15:26:00 with patch 101274)
When you hover over the images, the are replaced by broken images, when you
unhover, the original images return.

Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/2003051512
When you hover over the images, they vanish and the lower images move up. When
you unhover the original images do *not* return.

I am really surprised by the difference in Linux/Windows, I cannot promise this
is due to some setting. Anyhow, in both cases the rollover image is not
displayed. The reason as I understand it is that the content of the lowsrc
attribute is read, but that is no longer supported, see bug 92453.

There are similar bugs which are Tech Evangelism (bug 147646, cannot find the
rest right now). This bug shall not be about educating those guys, it shall be
about how to handle these scripts which are used on various pages.

Here a typical part from the source which is producing the problem:
<a
onmouseover="document['fpAnimswapImgFP1'].imgRolln=document['fpAnimswapImgFP1'].src;document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].lowsrc;"
onmouseout="document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].imgRolln"
href="firma.htm">
<img border="0" src="Bilder/verz_firma.jpg" width="200" height="32"
id="fpAnimswapImgFP1" name="fpAnimswapImgFP1"
dynamicanimation="fpAnimswapImgFP1" lowsrc="Bilder/verz_firma_mo.jpg"></a><br>

pi
I suggested this in Bug 160646
Looks like it, but the problem is deeper. I just test what would happen if I
replace lowsrc with alt which is a valid attribute. It still fails. I am still
investigating, but probably the bug is more complicated.

pi
In http://www.logic.univie.ac.at/~3.14/menu.html I played with it. With alt it
does work. But why is the original image not set back in the first part while it
works in the second? The onmouseout scripts are the same.

If this is wontfix, at least the JS-Console should show an error.

pi
This is not a JS Engine issue. JS Engine is the component for the 
abstract objects of JavaScript: Date(), Number(), RegExp(), etc.

It is not for DOM objects like |window|, |document|, etc., etc.
Reassigning to DOM Other component for parity with bug 160646 -
Assignee: rogerl → dom_bugs
Component: JavaScript Engine → DOM Other
QA Contact: pschwartau → gerardok
First of all, it's lowSrc not lowsrc. Second, the lowSrc attribute was removed
from nsIDOMHTMLImageElement in DOM Level 2 HTML
(http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-17701901).
Probably invalid, see bug 92453.
I see two issues: 1) There is no warning or anything in the JS-console which
makes it hard to understand, what actually fails. 2) The original image does not
come back. I cannot see why that would fail.

pi
Assignee: general → nobody
QA Contact: gerardok → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.