Re: [whatwg/dom] Do not dispatch a trusted event when target and reletedTarget are identical (#336)

hayatoito commented on this pull request.



> @@ -1201,6 +1201,9 @@ for discussion).
  <a>relatedTarget</a> against <var>target</var> if <var>event</var>'s <a>relatedTarget</a> is
  non-null, and null otherwise.
 
+ <li><p>If <var>event</var>'s {{Event/isTrusted}} attribute is true and <var>target</var> and
+ <var>relatedTarget</var> are identical, terminate these steps.

DOM Standard defines isTrusted as follows:

> event . isTrusted
> Returns true if event was dispatched by the user agent, and false otherwise.

I am not sure how we could interpret "event was dispatched by the user agent" strictly.
I tend to agree @smaug.  A click event triggered by `element.click()` is dispatched by users, instead of UA.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/336

Received on Wednesday, 5 October 2016 08:03:46 UTC