Skip to content

Commit 6745897

Browse files
authored
Merge pull request #1139 from maurodibert/patch-67
Update article.md
2 parents e4b7f66 + f56e924 commit 6745897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/09-classes/07-mixins/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ As `super` looks for parent methods in `[[HomeObject]].[[Prototype]]`, that mean
107107

108108
Now let's make a mixin for real life.
109109

110-
The important feature of many browser objects (not only) can generate events. Events is a great way to "broadcast information" to anyone who wants it. So let's make a mixin that allows to easily add event-related functions to any class/object.
110+
An important feature of many browser objects (not only) is that they can generate events. Events is a great way to "broadcast information" to anyone who wants it. So let's make a mixin that allows to easily add event-related functions to any class/object.
111111

112112
- The mixin will provide a method `.trigger(name, [...data])` to "generate an event" when something important happens to it. The `name` argument is a name of the event, optionally followed by additional arguments with event data.
113113
- Also the method `.on(name, handler)` that adds `handler` function as the listener to events with the given name. It will be called when an event with the given `name` triggers, and get the arguments from `.trigger` call.

0 commit comments

Comments
 (0)