Skip to content

Rewrite to use class#1

Open
KonSola5 wants to merge 1 commit intojezevec10:mainfrom
KonSola5:main
Open

Rewrite to use class#1
KonSola5 wants to merge 1 commit intojezevec10:mainfrom
KonSola5:main

Conversation

@KonSola5
Copy link

@KonSola5 KonSola5 commented Feb 1, 2025

This PR:

  • Rewrites the entire class to use, well, class instead of setting the prototype of the function,
  • Changes square bracket notation to dot notation (for example: emote["n"] => emote.n)
  • Removes needlessly used template literals: `${number}` => number,
  • Removes let self = this and rewrote some local functions to be arrow functions instead. Arrow functions don't generate this binding, so this will point to the class instance.
  • Removes usage of element.innerHTML = "" to clear out elements - replaced with element.replaceChildren().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant