Re: [whatwg/dom] "create an event" doesn't work for certain UI events (#414)

So given what we need for "relatedTargets" (see #585) I'm thinking the event constructor calls an internal algorithm that by default is a no-op. (We might want to define it works for inheritance somehow too.)

That way we construct the object, then for the dictionary members we set those dictionary members that have a corresponding internal slot on the object. Then we call that internal algorithm which can handle the remainder, e.g., setting relatedTargets based on the provided relatedTarget, or the much more complicated equivalent operation for Touch Events.

It seems this should work for keyboard events too. We'd recommend against relying on this algorithm without filing an issue against this repository for advice, or some such.

-- 
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/issues/414#issuecomment-372582895

Received on Tuesday, 13 March 2018 08:21:23 UTC