News for hackers. Stuff that matters.
Re:I can only think that modern front end development has fa... by pm on Sunday April 04, 2021 @08:34PM (#26694179)
What do you use instead of these constructs?
Re:I can only think that modern front end development has fa... by austincheney on Sunday April 04, 2021 @09:17PM (#26694403)
Instead of this I use explicitly named variables and functions.

Instead of addEventListener I assign event handlers directly to the event property of the DOM: button.onclick = whatever. This forces simplicity and cleaner code management because only one function can be assigned to any given property.

Instead of querySelectors I use other standard DOM methods.

Re:I can only think that modern front end development has fa... by robertakarobin on Sunday April 04, 2021 @09:32PM (#26694465)
Other standard DOM methods like what? getElementById and getElementsByClassName?
Re:I can only think that modern front end development has fa... by austincheney on Sunday April 04, 2021 @11:06PM (#26694900)
Try this for a starter guide: https://prettydiff.com/2/guide/unrelated_dom.xhtml

For a practical example try this: https://github.com/prettydiff/semanticText

Re:I can only think that modern front end development has fa... by Valord on Sunday April 04, 2021 @09:47PM (#26694528)
I also want to know this.
Re:I can only think that modern front end development has fa... by austincheney on Sunday April 04, 2021 @11:03PM (#26694886)
Try this for a starter guide: https://prettydiff.com/2/guide/unrelated_dom.xhtml

For a practical example try this: https://github.com/prettydiff/semanticText