Closed Bug 271278 Opened 20 years ago Closed 20 years ago

"javascript:<script>" handlers for XML Events (non-standard extension)

Categories

(Core :: DOM: Events, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: smaug, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040927
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040927

At least Novell has implemented "javascript:<script>" handlers in XML Events
for their XForms plugin for IE (beta was released today).
I think we could have it too.
Patch coming.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Attached patch v1Splinter Review
This patch compiles the script handlers everytime. Is that ok here?
Also, not sure what the 'this' should be, now it is 'window', like
in <a href="javascript:"/>. And should it be possible to use 'event'
in scripts. Comments?
woah woah woah. We shouldn't implement extensions like this if they're not in
the spec. Currently there isn't even a spec describing how XML Event Handlers
are supposed to work at all. I *strongly* urge us to wait for a spec here.
Summary: "javascript:<script>" handlers for XML Events → "javascript:<script>" handlers for XML Events (non-standard extension)
I have to agree.  There needs to be SOMEBODY endorsing this approach other than
just another company or there are going to be all kinds of wild tangents going
on in Mozilla.

I also agree that all three of your questions would need to be answered by the
standards group.  In my opinion, 'this' would have to be the element itself.  In
the case of the Novell examples, it would be the <ev:listener>.  This is the
approach that I'd take because that is how 'this' is resolved, I believe, when
there are onload="xxx" handlers on elements right now.  And I also think that
there needs to be access to the event inside the handler functions, since
current handlers have such access.

If Novell chooses to change their approach to use an tag-based event handler
that contains script, similar to the <script> handlers mentioned in the XML
Events spec but named something else, then we could support that using XBL and
not have to change any code.  Plus it would be more in line with the spec.
ok, this can wait until there is some kind of spec.
If I remember right S.Pemberton et al are going to
think about how script handlers should work.

But for now, invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: