JavaScript documentation in standardized event browsers

I am trying to learn JavaScript and find this task a bit complicated in some ways. I am currently looking for event support in major browsers. As far as events are concerned, there seem to be two common tastes: (1) the Microsoft way and (2) the standardized way.

I know that IE 8 does not support DOM Level 2 Events, but it is expected that IE 9 will support DOM Level 3 Events. On the Microsoft side, there is a separate list of DHTML Events . A description of the event object object is also available .

In a standardized way, I combine support for DOM Level 0, which does not have an official specification, and DOM Level 2 Events, which says W3C. The standardized method is usually followed by all major browsers except MSIE, namely Firefox, Chrome, Safari and Opera. Each of the standardized browsers has a different level of documentation around event support, as indicated by the following links.

DOM level events

Gecko DOM event handlers

Safari HTML Reference: Supported Attributes

HTML, XHTML, and WML in Opera Presto 2.8

No information for Chrome.

DOM level events

W3C DOM Level 2 Specification

Gecko DOM events (seems incomplete)

Other events DOM Gecko

Gecko DOM Event Object

WebKit standards support goals (implicitly covering Chrome and Safari at a high level)

Support for DOM 2, Mouse, and Mutation Events in Opera Presto 2.8

Can I say that the standardized browser documentation is compatible? I know Quirksmode Compatibility Tables for this type of information. However, I hardly find it reassuring when a problem arises, and I hope that there are details that I can count on. I would also like to exclude libraries (such as jQuery, etc.) at this point.

+4
source share
3 answers

No. Inside browsers, there are many changes around key events, and large libraries such as jQuery only normalize the minimum minimum (correctly, in my opinion). The only way to deal with inconsistencies is to learn from people who have learned the hard way. The best miles resource I've found is the Jan Voltaire page: http://unixpapa.com/js/key.html . Accurate and fairly comprehensive.

+2
source

Browsers have all kinds of quirks around things like keystroke detection, etc. Not all of these errors are obvious or present in all versions of the browser. I doubt that there is one authoritative source that perfectly describes events even for any browser, and especially all. ppk is pretty incredibly comprehensive, but lately it has shifted its focus to mobile devices.

In any case, you can probably write something that will work mainly, but these libraries test an order of magnitude more than you could do yourself. If your goal is to learn, then by all means research and experiment. But do not reinvent the wheel. Whenever I need a standalone solution for a specific DOM application (for example, which mouse button was clicked on a click event), I first look at the documentation and then I look at how various libraries do it.

+1
source

Most people use http://www.quirksmode.org/ as their primary link.

0
source

Source: https://habr.com/ru/post/1347665/


All Articles