How to check if the caps lock is on in JavaScript?

To detect if the caps lock is on, use the getModifierState() method for the KeyboardEvent object: const capslockIsOn = event.getModifierState(modifier); The getModifierState() (…)… Read more

Similar

V8 JavaScript Engine 8.0 Reduces Heap by 40%

The latest release of Google's V8 JavaScript engine, V8 8.0, uses pointer compression to reduce heap size by 40% and with no performance hit. Additionally, it adds support for optional chaining using the ?. operator and for nullish coalescence using ??. V... (more…)

Read more »

Live server push without JavaScript

So in my post Is this evil? I covered a way of tracking users with CSS. While thinking about those weird ways of using the web I also started thinking about pushing live data to clients without JS. Or at least maintaining a connection. So... (more…)

Read more »

Rethinking the JavaScript Ternary Operator

Lots of people treat the ternary operator with suspicion. At first glance, ternaries appear unnecessary. Nothing more than a tool for the overly clever to trim some characters from their code. A favourite hack for coders who don’t care about readability. ... (more…)

Read more »