diff --git a/docs/HELPERS_API.md b/docs/HELPERS_API.md index 860556a..84eeb41 100644 --- a/docs/HELPERS_API.md +++ b/docs/HELPERS_API.md @@ -236,14 +236,14 @@ setParam({ a: 1, b: 2 }) ## Events -### `on(query, events, callback)` +### `on(query, events, callback, options = {})` Wraps `addEventListener`. Example: ```js -on(document, 'scroll', (e) => { - addClass('body', 'scrolling') -}) +on(document, 'click', (e) => { + addClass('.welcome-message', 'hide') +}, { once: true }) ``` Accepts multiple events: