[WICG/webcomponents] event.composedPath()[0] can be very slow: add event.composedTarget? (Issue #1070)

We have [a report](https://github.com/lit/lit/pull/4734) that `event.composedPath()` can be slow enough to drastically slow down an initial render that uses it heavily (~29% percent of initial render time).

This use case, and a few others I've seen, only needs the composed target, not the full path, (ie `event.composedPath()[0]`). Could we add `Event.prototype.composedTarget` so the full path doesn't need to be materialized?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1070
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1070@github.com>

Received on Tuesday, 20 August 2024 20:13:07 UTC