as

The `id` attribute got more `class`y in HTML5

One of the more subtle yet awesome changes that HTML5 brings, applies to the id attribute. I already tweeted about this a few months ago, but I think this is interesting enough to write about in more than 140 characters.




as

Bulletproof JavaScript benchmarks

The following article, written by John-David Dalton and yours truly, was published as part of the Performance Calendar series in 2010.




as

Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback

HTML5 standardizes the oninput event handler, which should be used to detect user input in JavaScript. Sure, you could use onkeydown or onkeyup instead, but those were never really designed for this particular use case, and it shows.




as

How I detect and use `localStorage`: a simple JavaScript pattern

By now, everyone knows how to detect and use localStorage. However, I’ve been using a seemingly unconventional (but slightly more efficient) technique to do so. Since I haven’t seen it documented anywhere else, here goes!




as

JavaScript `foo.prototype.bar` notation

As a follow-up to the post documenting a few popular HTML element + attribute notations, here’s a similar one about JavaScript.




as

JavaScript character escape sequences

Having recently written about character references in HTML, I figured it would be interesting to look into JavaScript character escapes as well.




as

JavaScript’s internal character encoding: UCS-2 or UTF-16?

Does JavaScript use UCS-2 or UTF-16 encoding? Since I couldn’t find a definitive answer to this question anywhere, I decided to look into it. The answer depends on what you’re referring to: the JavaScript engine, or JavaScript at the language level.




as

Valid JavaScript variable names in ES5

Did you know var π = Math.PI; is syntactically valid JavaScript? I thought this was pretty cool, so I decided to look into which Unicode glyphs are allowed in JavaScript variable names, or identifiers as the ECMAScript specification calls them.




as

Unquoted property names / object keys in JavaScript

Fun fact: var foo = { H̹̙̦̮͉̩̗̗ͧ̇̏̊̾Eͨ͆͒̆ͮ̃͏̷̮̣̫̤̣Cͯ̂͐͏̨̛͔̦̟͈̻O̜͎͍͙͚̬̝̣̽ͮ͐͗̀ͤ̍̀͢M̴̡̲̭͍͇̼̟̯̦̉̒͠Ḛ̛̙̞̪̗ͥͤͩ̾͑̔͐ͅṮ̴̷̷̗̼͍̿̿̓̽͐H̙̙̔̄͜: 42 }; is valid JavaScript. It may not be immediately obvious, but the real surprise here is that the Cthulhu-esque property name is not surrounded by quotes. Intrigued by this, and having written about the similar topic of JavaScript identifiers before, I decided to look into valid property names in JavaScript. When do they need to be quoted? When can the quotes be omitted? And in which cases can dot notation be used instead of bracket notation to get or set a property based on its name?




as

How to support full Unicode in MySQL databases

Are you using MySQL’s utf8 charset in your databases? In this write-up I’ll explain why you should switch to utf8mb4 instead, and how to do it.




as

Reserved keywords in JavaScript

Looking for a list of all reserved words in JavaScript? You’ve come to the right place. I recently needed such a list myself, but ended up comparing the reserved keywords in all ECMAScript versions as well. The result is listed below, for future reference.




as

JavaScript has a Unicode problem

The way JavaScript handles Unicode is… surprising, to say the least. This write-up explains the pain points associated with Unicode in JavaScript, provides solutions for common problems, and explains how the ECMAScript 6 standard improves the situation.




as

PBKDF2+HMAC hash collisions explained

It’s trivial to find colliding passwords when hashing with PBKDF2-HMAC-anything. This post explains why that is.




as

Dear Google, please fix plain text emails in Gmail

By default, composing a new email in Gmail results in an HTML email under the hood. It’s possible to opt-out of that and use plain text email instead, but that leads to some problems.




as

Valid JavaScript variable names in ES2015

ES2015 updates the grammar for identifiers. This affects a number of things, but most importantly, identifiers can be used as variable names, and identifier names are valid unquoted property names. This post describes the observable changes compared to the old ES5 behavior.




as

Unicode property escapes in JavaScript regular expressions

ES2018 adds support for Unicode property escapes of the form p{…} and P{…} to JavaScript regular expressions. This article explains what Unicode property escapes are, how they work, and why they’re useful.




as

ECMAScript regular expressions are getting better!

This article highlights what’s happening in the world of JavaScript regular expressions right now. Spoiler: it’s quite a lot — there are more RegExp-related proposals currently advancing through the TC39 standardization process than there have been updates to RegExp in the history of ECMAScript!




as

Asynchronous stack traces: why `await` beats `Promise#then()`

Compared to using promises directly, not only can async and await make code more readable for developers — they enable some interesting optimizations in JavaScript engines, too! This write-up is about one such optimization involving stack traces for asynchronous code.




as

JavaScript engine fundamentals: Shapes and Inline Caches

This article describes some key fundamentals that are common to all JavaScript engines — and not just V8, the engine the authors work on. As a JavaScript developer, having a deeper understanding of how JavaScript engines work helps you reason about the performance characteristics of your code.




as

JavaScript engine fundamentals: optimizing prototypes

This article explains JavaScript engine optimization pipeline trade-offs, and describes how engines such as V8 speed up accesses to prototype properties. As a JavaScript developer, having a deeper understanding of how JavaScript engines work helps you reason about the performance characteristics of your code.




as

A horrifying `globalThis` polyfill in universal JavaScript

The globalThis proposal introduces a unified mechanism to access the so-called “global object” a.k.a. “the global” in any JavaScript environment. It sounds like a simple thing to polyfill, but it turns out it’s pretty hard to get right.




as

Death toll now 44, TN sees 526 more +ve cases




as

TN: As Chennai botches up, districts show way

As Chennai still grapples with scanty containment zone management and spike in the number of positive cases, other districts in the state have succeeded in flattening the curve using effective containment strategy.




as

Chennai: 356 passengers from Dubai quarantined

All the 356 passengers who arrived from Dubai by the first two rescue flights were sent to quarantine centres after their throat and nasal swabs were taken at Chennai airport on Saturday. The first flight IX 612 had 179 passengers and the second 177.




as

Master the claim procedure to cope better during emergency in family

With the onset of this pandemic, policyholders should now take the next crucial step of understanding how to go about filing a health insurance claim




as

166 stranded passengers in Jammu sent to native states in buses




as

Delhi HC directs authorities to declare candiate with bipolar disorder as selected for Delhi Judicial Service




as

Uttarakhand Police to probe complaints of sexual harassment against former IAS officer, Shantikunj Haridwar chief




as

53 new COVID-19 cases, 1 death in Indore on Friday




as

Clear directions given to officials to not allow schools to open: Basic Education Officer, Aligarh




as

13 new COVID-19 cases reported in J-K




as

'I am healthy, have no disease,' says Amit Shah dismissing rumours around his health




as

Locals demand relocation of LG Polymers after gas leak




as

JNU releases tentative academic calendar for Monsoon session, set to return to classes by June 25




as

Crime rate drastically reduced during lockdown: Goa police




as

Delhi HC asks authorities to consider plea to mandate identity proof to purchase metro card




as

COVID-19 crisis: Chhattisgarh CM writes to PM, asks for Rs 30,000 crore package for state




as

Crime cases in Goa drop by 67 pc amid COVID-19 lockdown




as

36 new COVID-19 cases reported in Karnataka, state tally 789




as

Excise duty on liquor increased by 25pc : Assam Industries and Commerce Minister




as

Govt revises discharge policy: Severe Covid cases will have to test negative through RT-PCR




as

16 new cases, 11 more containment zones in Gurugram




as

Jogi has heart attack, is stable




as

Do not anticipate worst case situation like developed countries in India, says Union Health Minister Harsh Vardhan




as

Naidu writes to PM, requests scientific probe into Vizag gas leak incident




as

TRF, Pakistan's IT cell for terror groups in Kashmir?




as

Vehicles return to Hyderabad roads after easing of lockdown




as

Spike in Covid cases continues in Karnataka, tally 794




as

Plea in Delhi HC seeks SIT, CBI probe into 'Bois Locker Room' case




as

Suicide case: AAP legislator Jarwal, aide arrested