Remove support for event.originalTarget and event.explicitOriginalTarget on DOM events

NEW
Unassigned

Status

()

Core
DOM: Events
7 years ago
5 months ago

People

(Reporter: David Bruant, Unassigned)

Tracking

(Blocks: 3 bugs, {dev-doc-needed, site-compat})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
These two properties are documented here: https://developer.mozilla.org/en/DOM/event/Comparison_of_Event_Targets
However, I have never seen them being used, there is no support in other browser I'd be aware of and current standard event properties (target & currentTarget) seems to enough to cover people use cases.
(Reporter)

Updated

7 years ago
Blocks: 481510
(Reporter)

Updated

7 years ago
Blocks: 517007
(Reporter)

Updated

7 years ago
Blocks: 343032
> However, I have never seen them being used

http://mxr.mozilla.org/mozilla-central/search?string=originalTarget&find=.js&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central

These are needed to deal with XBL-bound anonymous content.  Browsers that don't implement XBL don't need these properties, of course.

We could moz-prefix these, I guess, but that would be a pretty significant change.
.originalEventTarget is coming from http://www.w3.org/TR/2001/NOTE-xbl-20010223/#anonymous-events-scopes
(Not that Gecko's XBL1 implementation is exactly what that W3C note defines)
(Reporter)

Comment 3

7 years ago
Ok, changing bug title accordingly.
Since these properties aren't part of the DOM Event Spec, then, specifically on DOM events, they should be removed.
Summary: remove support for event.originalTarget and event.explicitOriginalTarget → Remove support for event.originalTarget and event.explicitOriginalTarget on DOM events
You seem to have completely misunderstood comment 1 and comment 2....
(Reporter)

Comment 5

7 years ago
(In reply to comment #4)
> You seem to have completely misunderstood comment 1 and comment 2....
Maybe? :-s

Ok, Hmm... My understanding is that XBL needs these properties, so they shouldn't be removed entirely (and your link to mxr was a proof that they are used in Mozilla codebase)
However, the DOM event spec doesn't define these properties (that's why I filed this bug under the "DOM:Event" component).

But maybe I misunderstand what XBL is. From what I've read on the spec, this isn't part of any DOM&friends spec.
I guess I should restart by asking the question: is XBL something that web developers use? want to use? Is it relevant to provide XBL features to web developers?
And if not, should it be hidden to them? I don't know if bug 343032 and bug 517007 are still up-to-date, but if they are, it would be some indication that this feature isn't really safe to expose to web developers. Worst case, it could turn into an obscure security issue.
> is XBL something that web developers use?

Not anymore, but they used to.

> want to use?

Yes.

> Is it relevant to provide XBL features to web developers?

The question is how to tell apart "web developers" and "extension developers"; they're both programming to the same DOM event model.

Updated

5 months ago
Keywords: dev-doc-needed, site-compat
OS: Linux → All
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.