You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/2-events/01-introduction-browser-events/article.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ There are many other events. We'll get into more details of particular events in
30
30
31
31
To react on events we can assign a *handler* -- a function that runs in case of an event.
32
32
33
-
Handlers is a way to run JavaScript code in case of user actions.
33
+
Handlers are a way to run JavaScript code in case of user actions.
34
34
35
35
There are several ways to assign a handler. Let's see them, starting from the simplest one.
36
36
@@ -288,7 +288,7 @@ Multiple calls to `addEventListener` allow to add multiple handlers, like this:
288
288
289
289
As we can see in the example above, we can set handlers *both* using a DOM-property and `addEventListener`. But generally we use only one of these ways.
290
290
291
-
````warn header="For some events handlers only work with `addEventListener`"
291
+
````warn header="For some events, handlers only work with `addEventListener`"
292
292
There exist events that can't be assigned via a DOM-property. Must use `addEventListener`.
293
293
294
294
For instance, the event `transitionend` (CSS animation finished) is like that.
@@ -354,7 +354,7 @@ Some properties of `event` object:
354
354
`event.clientX / event.clientY`
355
355
: Window-relative coordinates of the cursor, for mouse events.
356
356
357
-
There are more properties. They depend on the event type, so we'll study them later when come to different events in details.
357
+
There are more properties. They depend on the event type, so we'll study them later when we come to different events in details.
358
358
359
359
````smart header="The event object is also accessible from HTML"
360
360
If we assign a handler in HTML, we can also use the `event` object, like this:
0 commit comments