-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events confusion #2771
Comments
they are normalised events. see http://mootools.net/core/docs/1.6.0/Types/DOMEvent |
@NaridaL as @DimitarChristoff pointed out MooTools creates its own Event object, the purpose is to provide a object with normalized values so you get the same values out of it in all browsers. You can still access the original event, you can access it in the |
@SergioCrisostomo Thanks for the info, I had missed something, as I thought. However it seems the underlying issue of the broken links and the doc not being very informative is still open...? |
@NaridaL good point! Sent a pull request to fix that broken link. Thanks! |
Maybe I'm missing something, but it seems the event handling documentation could be clearer. The documentation for http://mootools.net/core/docs/1.6.0/Element/Element.Event doesn't specify the expected signature of the event handler function (fn in myElement.addEvent(type, fn);)
The assumption that it's the same as the standard addEventListener is wrong, because it gets passed a Mootools Event (whose documentation is broken: http://mootools.net/core/docs/1.6.0/Element/Element.Event links to http://mootools.net/core/docs/1.6.0/Types/Event#Event:stop which 404s).
The Mootools Event isn't compatible with the standard one, for example shiftKey is renamed to shift, although it's not really clear why. cf. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/shiftKey and https://w3c.github.io/uievents/#dom-keyboardevent-shiftkey
The text was updated successfully, but these errors were encountered: