Open
Bug 246720
Opened 21 years ago
Updated 2 years ago
xul oncommand attribute isn't parsed when accessed through DOM
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
NEW
People
(Reporter: jruderman, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
In bug 246719, I'm trying to make middle-clicking on more elements work, using
code like:
oncommand="var url = ...; openUILink(url, event);"
onclick="if(event.button==1) this.oncommand(event);"
If I middle-click an element with this before left-clicking it, I get
"this.oncommand is not a function" and openUILink is not called. If I
left-click first, it works fine when I middle-click.
Reporter | ||
Comment 1•21 years ago
|
||
Workaround: use eval. eval(this.getAttribute('oncommand'))
I don't like this workaround because using eval in chrome JS can be dangerous,
and because it's more code than this.oncommand(event).
Reporter | ||
Comment 2•21 years ago
|
||
bugzilla-mozilla@dorando.at had the same problem in bug 230401. Once this is
fixed, the code from bug 230401 and bug 246719 should be changed to not use eval().
Comment 3•20 years ago
|
||
*** Bug 284250 has been marked as a duplicate of this bug. ***
Comment 4•19 years ago
|
||
Note that we do have a .doCommand but it doesn't take an existing event.
Updated•15 years ago
|
Assignee: events → nobody
QA Contact: ian → events
Updated•6 years ago
|
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•