[Bug 25458] [Shadow]: The return type of Event.path should be EventTarget[], instead of NodeList

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25458

--- Comment #16 from Hayato Ito <hayato@chromium.org> ---
(In reply to Boris Zbarsky from comment #15)
> > Nobody does that in JS.
> 
> In all fairness, until recently there weren't any tools in the language for
> people to do that, no?
> 
> I don't actually have a strong opinion on this stuff, as long as we make it
> clear that the internal implementation is not using the modified data.  I
> just want to make sure we're considering all the issues here.

In the current blink's implementation, the internal implementation is not using
the modified data.
An even.path always creates a new array instance and returns it. Modifying the
returned array doesn't have any affect to the internal implementation.

Anyway, I'd like to know what is a recommended way for event.path.
Is there any suggestion?

1). Use 'readonly attribute EventTarget[] event.path' and fix the blink's
implementation of T[].

2). Because T[] is going away in IDL, find the other reasonable way, though I'm
not sure what is an available option here.

3). Make event.path an operation: 'sequence[EventTarget] getPath()'

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 30 April 2014 06:42:05 UTC