Skip to content

Commit a6f19fb

Browse files
authored
Update article.md
Minor changes to grammar
1 parent 53b35c1 commit a6f19fb

File tree

1 file changed

+2
-2
lines changed
  • 2-ui/2-events/01-introduction-browser-events

1 file changed

+2
-2
lines changed

2-ui/2-events/01-introduction-browser-events/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Assign a handler to `elem.onclick`, not `elem.ONCLICK`, because DOM properties a
195195

196196
## addEventListener
197197

198-
The fundamental problem of the aforementioned ways to assign handlers -- we can't assign multiple handlers to one event.
198+
The fundamental problem of the aforementioned ways to assign handlers is that we *can't assign multiple handlers to one event*.
199199

200200
Let's say, one part of our code wants to highlight a button on click, and another one wants to show a message on the same click.
201201

@@ -207,7 +207,7 @@ input.onclick = function() { alert(1); }
207207
input.onclick = function() { alert(2); } // replaces the previous handler
208208
```
209209

210-
Developers of web standards understood that long ago and suggested an alternative way of managing handlers using special methods `addEventListener` and `removeEventListener`. They are free of such a problem.
210+
Developers of web standards understood that long ago and suggested an alternative way of managing handlers using the special methods `addEventListener` and `removeEventListener` which do not have the same constraints as event handlers.
211211

212212
The syntax to add a handler:
213213

0 commit comments

Comments
 (0)