Script FOR and EVENT attributes still not handled properly - bug 174404 not fixed.

RESOLVED WONTFIX

Status

()

Core
DOM: Events
RESOLVED WONTFIX
14 years ago
12 years ago

People

(Reporter: John Vance, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925

IE style event scripts of the form <SCRIPT FOR="foo" EVENT="bar"> do not
execute, with the exception of window onload scripts, which are executed inline
instead of on the onload event.  See bug 174404, bug 191579, and bug 184159.

Bug 174404 fixed the problem of event handler scripts in the head portion of the
document executing inline, but did not actually attach the event handlers to the
specified events on the specified objects.  I'm guessing insufficient regression
testing on either 191579 or 184159 broke 174404

Reproducible: Always

Steps to Reproduce:
1.Put the following html somewhere.  Pre tags just in case:
<PRE>
<!-- snip here -->
<HTML>
<HEAD>
<SCRIPT language="JavaScript" FOR="btn" EVENT="onmouseover">

	alert("JavaScript fired!");
</SCRIPT> 
</HEAD>
<BODY>
<!-- <FORM name="Form1"> -->
<BUTTON NAME="btn" ID="btn" VALUE="">Foo!</BUTTON>

<!-- </FORM> -->
</BODY>
</HTML>
<!-- snip here -->
</PRE>

2.Open it in IE 6 and mouseover the button.  An alert box pops up.
3.Open it in Mozilla 1.5 rc 2 and mouseover the button.  Nothing happens.
4.Substituted different events (i.e. onClick) and fire the event.  Works in IE,
does nothing in Mozilla.  

4. Exception: <SCRIPT FOR="window" EVENT="onload"> in head executes inline (bug
191579)



Actual Results:  
Event handler not executed.

Expected Results:  
Event handler should execute when event triggered.
1)  The testcase uses incorrect syntax (should use event="onmouseover()").

2)  The patch for bug 174404 never worked in builds without XPC_IDISPATCH_SUPPORT
    defined, as far as I can tell.  Not sure whether this was the intent....
    Adam?

3)  Bug 191579 made for="window" event="onload()" scripts execute inline.  This
    was purposeful.

4)  This is totally the wrong component.  The parser already handles these
    correctly; any further work has to be in the guts of the event system.
Assignee: parser → events
Component: Parser → DOM Events
QA Contact: ian
(Reporter)

Comment 2

14 years ago
(Apologies if this is a double post)

> 1)  The testcase uses incorrect syntax (should use event="onmouseover()").

Corrected syntax, still doesn't work.  Continues to work in IE 6.

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT language="JavaScript" FOR="btn" EVENT="onmouseover()">

        alert("JavaScript fired!");
        return true;

</SCRIPT> </HEAD>

<BODY>
<!--<FORM name="Form1"> -->

<BUTTON NAME="btn" ID="btn" VALUE="">Foo!</BUTTON>

<!--</FORM>-->
</BODY>
</HTML>


>
> 2)  The patch for bug 174404 never worked in builds without
XPC_IDISPATCH_SUPPORT
>     defined, as far as I can tell.  Not sure whether this was the intent....
>     Adam?

Is that the problem?  I'm using 1.5 rc 2.  Are there any windows builds
available with XPC_IDISPATCH_SUPPORT defined that I can test against?

> 4)  This is totally the wrong component.  The parser already handles these
>     correctly; any further work has to be in the guts of the event system

I filed under the same component that 174404 was filed under, since it
seems to be a continuation of 174404.  If confirmed, maybe close this and
reopen 174404?
bug 174404 was about the parser changes needed.  Those were made and are still
in place.  Remaining work to make this "work" has nothing to do with parser....
We never intended to support this script/event syntax in Mozilla in general, the
exception was to support it when working with ActiveX plugins due to the fact
that most of the content out there used this syntax when dealing with ActiveX
plugins. In the non-plugin case this syntax is not very common, and there are
perfectly well working standards compliant alternatives.

For now, there are no known plans to implement this IE'ism in Mozilla.
(Reporter)

Comment 5

14 years ago
Fair enough.

I'm working with a web application that uses this and other IE "extensions", and
I'm trying in my copious spare time to flush out all the mozilla-incompatible
stuff.  I was hoping that this was supported as it would relieve some tedium.

Please mark this bug as invalid or wontfix, whichever is appropriate.  I will
add a comment to Bug 174404 clarifying its intent.

Adam, could you please change the wording on your ActiveX Plug-in page
 
http://www.iol.ie/~locka/mozilla/plugin.htm

regarding "scripting the plugin - For COM Connect - events" as follows:

"Mozilla builds with ActiveX support enabled understand the <script for=""
event=""> notation for handling events and the plug-in will call these methods
in response to events fired by the control."   

Thanks all. 

Comment 6

12 years ago
(In reply to comment #4)
> For now, there are no known plans to implement this IE'ism in Mozilla.

Let's resolve this bug as WONTFIX then.

Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.