I like .bind() more
This commit is contained in:
parent
702bc64bc3
commit
3ca47ce108
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ class EventHandler {
|
||||||
try { document.addEventListener(eventType, () => fn()) } catch (_) {};
|
try { document.addEventListener(eventType, () => fn()) } catch (_) {};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Attatches the events you passed when creating the class. If none are passed, an error is thrown.
|
* Binds the events you passed when creating the class to the document. If none are passed, an error is thrown.
|
||||||
*/
|
*/
|
||||||
bind(): void | Error {
|
bind(): void | Error {
|
||||||
const events = Object.entries(this.#eventItems.events);
|
const events = Object.entries(this.#eventItems.events);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue