Closed Bug 868395 Opened 11 years ago Closed 4 months ago

Have event target chain accessible from the event object?

Categories

(Core :: DOM: Events, defect, P3)

21 Branch
x86
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 1412775

People

(Reporter: u462496, Unassigned)

Details

Would it be possible and not too difficult to have a property or method added to the standard event properties that would give access to the target chain of the event?  That would be the same data that nsIEventListenerService.getEventTargetChainFor() would provide.

Such data could be very convenient for filtering events.

event.targetChain

or

event.getEventTargetChainFor()
Component: Untriaged → DOM: Events
Product: Firefox → Core
Is there a chance of anything ever happening with this?

Chrome already has something similar to this:

https://developer.mozilla.org/en-US/docs/Web/API/Event/deepPath
Flags: needinfo?(overholt)
(Profuse apologies for my delay here)

(In reply to Kevin Jones from comment #1)
> Is there a chance of anything ever happening with this?
> 
> Chrome already has something similar to this:
> 
> https://developer.mozilla.org/en-US/docs/Web/API/Event/deepPath

Anne, do you know about this?
Flags: needinfo?(overholt) → needinfo?(annevk)
The standardized variant is called https://dom.spec.whatwg.org/#dom-event-composedpath and part of "Shadow DOM". Chrome will drop deepPath eventually.
Flags: needinfo?(annevk)
Given comment 3, should we dupe this to bug 1205323? Kevin, what do you think?
Flags: needinfo?(kevinhowjones)
It kind of looks like `composedPath()` would work, though I don't know if am not familiar enough with this API to comment on this.
Flags: needinfo?(kevinhowjones)
Priority: -- → P3
Severity: normal → S3
Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1412775
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.