5 ms·
My favorite one-line jquery alternative
const $ = (q) => document.querySelectorAll(q);
To be a blazing fast electron app, I've build www.monsterwriter.app with W3C standards only.
- kieranpotts 7y agoThe MonsterWriter app looks awesome, I'll check it out.
- WolfOliver 7y agoThank You! The most important think I need at the moment is feedback :) I've you have any remarks on that, let me know!
- krapp 7y agoBut I've been assured by Hacker News that it's impossible to work with javascript without first compiling it from a language that compiles from another language into a frontend framework that virtualizes an entire Linux architecture. What is this demon sorcery?!
- gitgud 7y agoHacker News (this page) actually does something very similar, but getElementById is more widely supported... function $(id) { return document.getElementById(id); }
- halfjoking 7y agoThis post is making me think I need to change my Chrome extension that injects jQuery as a content script. I assumed injecting a new/different jquery wouldn't break most sites, but if people are doing this then it definitely would.