{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/dom/issues/645","repository_url":"https://api.github.com/repos/whatwg/dom","labels_url":"https://api.github.com/repos/whatwg/dom/issues/645/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/dom/issues/645/comments","events_url":"https://api.github.com/repos/whatwg/dom/issues/645/events","html_url":"https://github.com/whatwg/dom/issues/645","id":320721523,"number":645,"title":"Editorial: improve clarity in event dispatch model","user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars0.githubusercontent.com/u/1544111?v=4","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"labels":[{"id":868220719,"url":"https://api.github.com/repos/whatwg/dom/labels/topic:%20events","name":"topic: events","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-07T08:40:36Z","updated_at":"2018-05-09T14:08:34Z","closed_at":null,"author_association":"OWNER","body":"In https://bugzilla.mozilla.org/show_bug.cgi?id=1449560#c5 @bzbarsky wrote:\r\n\r\n> In particular, the fact that the \"target\" in the dispatch algorithm becomes the \"item\" in the event path structs.\r\n\r\nI'd welcome ideas on how to improve this. I agree it's a bit of a mess, but I also don't quite see how to make things substantially better. We could rename to \"item\" to \"current target\" perhaps, but I'm not sure if that helps or hurts things.\r\n\r\n> I _really_ hope \"the last tuple in event’s path whose target is non-null\" is in fact the thing that we are thinking of as the target of the event... Is it?\r\n\r\nIt's the outermost target. The innermost target (the one passed to dispatch) will be the first tuple in event's path whose target is non-null."},"comment":{"url":"https://api.github.com/repos/whatwg/dom/issues/comments/387751088","html_url":"https://github.com/whatwg/dom/issues/645#issuecomment-387751088","issue_url":"https://api.github.com/repos/whatwg/dom/issues/645","id":387751088,"user":{"login":"bzbarsky","id":1457979,"avatar_url":"https://avatars1.githubusercontent.com/u/1457979?v=4","gravatar_id":"","url":"https://api.github.com/users/bzbarsky","html_url":"https://github.com/bzbarsky","followers_url":"https://api.github.com/users/bzbarsky/followers","following_url":"https://api.github.com/users/bzbarsky/following{/other_user}","gists_url":"https://api.github.com/users/bzbarsky/gists{/gist_id}","starred_url":"https://api.github.com/users/bzbarsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzbarsky/subscriptions","organizations_url":"https://api.github.com/users/bzbarsky/orgs","repos_url":"https://api.github.com/users/bzbarsky/repos","events_url":"https://api.github.com/users/bzbarsky/events{/privacy}","received_events_url":"https://api.github.com/users/bzbarsky/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T14:08:34Z","updated_at":"2018-05-09T14:08:34Z","author_association":"NONE","body":"One option is to rename `item` to `current target` in the dispatch structs and then rename `target` to `current target` in the algorithm that constructs them, so that the names match....\r\n\r\nAnd maybe call the thing that becomes `target` in the dispatch struct `targetOverride` or `target` consistently?  Less sure about this one.\r\n\r\nIt would also help a lot if https://dom.spec.whatwg.org/#concept-event-path-append described the meaning of the members of the struct.  Right now nothing seems to do that, so you have to go dig to figure out what the difference is between the `target` and `targetOverride` arguments and when one would use one vs the other.  I _think_ the `target` argument is what will become the event's `currentTarget` when dispatching to this struct and `targetOverride`, if not null, is what retargets the event at shadow dom boundaries?  But I'm not 100% sure that's always the case even after reading through this stuff for a bit and double-checking with smaug."}}
{"actor":{"display_login":"bzbarsky"}}