12 Matching Annotations
  1. Feb 2021
    1. There’s an important wrinkle when it comes to animating the menu away. When the user closes the menu, it will always disappear instantly, because the open attribute is, by default, removed immediately when the user clicks that summary element. In order to gracefully animate your menu out when it closes, we need some JavaScript. Here we can listen for clicks on the details element, and call preventDefault() on the click event, then use setTimeout() to determine exactly when that open attribute should be removed. This gives us time to trigger the closing animation with CSS. This click event listener will also fire when a keyboard user hits space or enter while the element is focused, which means no further listeners are needed for keyboard actions!
  2. Jan 2021
    1. JavaScript is more brittle than we care to admit. <a> elements function even if JavaScript breaks. Using anchors for your download means that a person can access what they need, even in suboptimal situations.
  3. Nov 2020
  4. Sep 2020
  5. Jun 2020
    1. We do know that, just like iMessage, this new approach will failover to SMS/MMS if a user cannot receive the encrypted variant or if bandwidth is insufficient on either end.
    2. A couple of years after WhatsApp, Apple jumped into the game with iMessage—its obvious drawback, that senders and recipients had to be using iPhones, was overcome by integration with the standard SMS platform on those phones. If a recipient was not on iMessage or was offline, the message would revert to SMS.
  6. May 2020
    1. Adopting TypeScript is not a binary choice, you can start by annotating existing JavaScript with JSDoc, then switch a few files to be checked by TypeScript and over time prepare your codebase to convert completely.
    1. First proposed as a somewhat less unwieldy catchall phrase to describe the delicate art of "separating document structure and contents from semantics, presentation, and behavior"
    2. In progressive enhancement (PE) the strategy is deliberately reversed: a basic markup document is created, geared towards the lowest common denominator of browser software functionality, and then the designer adds in functionality or enhancements to the presentation and behavior of the page, using modern technologies such as Cascading Style Sheets, Scalable Vector Graphics (SVG), or JavaScript.
    3. graceful degradation
  7. Jan 2015