From b0a86b9010d0924c04e0742f2742b7fcecb3e61b Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Tue, 20 Sep 2022 13:56:05 +0200 Subject: [PATCH] minor fixes --- 2-ui/2-events/01-introduction-browser-events/article.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/2-ui/2-events/01-introduction-browser-events/article.md b/2-ui/2-events/01-introduction-browser-events/article.md index e2229d18..0770b73d 100644 --- a/2-ui/2-events/01-introduction-browser-events/article.md +++ b/2-ui/2-events/01-introduction-browser-events/article.md @@ -373,7 +373,7 @@ For instance: As we can see, when `addEventListener` receives an object as the handler, it calls `obj.handleEvent(event)` in case of an event. -We could also use a class (although we still have to instantiate it as an object): +We could also use objects of a custom class, like this: ```html run @@ -395,6 +395,7 @@ We could also use a class (although we still have to instantiate it as an object *!* let menu = new Menu(); + elem.addEventListener('mousedown', menu); elem.addEventListener('mouseup', menu); */!*