Episode Summary
Executive Summary: The hosts survey emerging JavaScript and browser-platform features, including new Promise combinators, native lazy loading, CSS Houdini, subgrid, browser modules, and trusted web activities for publishing PWAs in Google Play. They emphasize that native browser capabilities can reduce custom code and improve performance, while noting practical adoption details, compatibility, and potential pitfalls such as over-nesting CSS.
Main Topics: New Promise combinators: Promise.allSettled and Promise.any are discussed as additions to complement Promise.all and Promise.race. allSettled waits for every promise regardless of success or failure; any waits for a fulfillment rather than settling on the first rejection. These can simplify coordinating multiple requests. Native lazy loading for images and iframes: The hosts highlight the proposed loading attribute, especially loading="lazy", as a browser-native alternative to libraries and custom code. They also mention eager and auto modes, progressive enhancement, and the potential to defer loading embedded iframes. CSS Houdini and extensible styling: Houdini's paint worklets could let developers create custom visual effects and CSS-like capabilities, such as unusual borders, gradients, checkboxes, and tooltips, using JavaScript and the Canvas 2D API. The hosts see strong potential but note the math and drawing skills involved. CSS layout and styling improvements: The episode covers subgrid for aligning descendants to a parent grid, CSS scroll snapping and smooth scrolling, aspect-ratio units, and proposed native CSS nesting. Together, these features could reduce layout workarounds and extra markup; nesting remains easy to overuse. Native JavaScript modules: The hosts discuss using ES modules directly in browsers with script type="module", potentially without a compilation step, and dynamic imports for code splitting. They also explain Node.js plans to distinguish module behavior through package.json configuration while retaining familiar file extensions. Progressive web apps in Google Play: Trusted Web Activities (TWAs) offer a way to package a PWA for the Play Store in a Chrome-powered environment. Requirements discussed include HTTPS, a service worker, a web app manifest, an icon, and a Lighthouse performance score; examples cited include Twitter Lite, Google Maps Go, and Instagram Lite. Workshops, learning, and developer practice: In their opening conversation, the hosts contrast well-structured hands-on workshops with a disappointing API-focused session that failed to teach its advertised technology. They also discuss preparing a Gatsby workshop and encourage developers to explore emerging tools and share examples.
Key Arguments: Browser-native features can deliver faster or simpler applications without requiring developers to add and maintain as much custom code; native lazy loading is presented as a clear example. Promise.allSettled and Promise.any address different coordination needs from Promise.all and Promise.race, particularly when requests may fail independently or the first successful result is what matters. Houdini may significantly expand what developers can do with CSS, but making effective paint worklets likely requires comfort with Canvas drawing and mathematical calculations. Subgrid and other CSS additions can reduce extra markup and workarounds by giving developers more direct control over alignment, scrolling, and sizing. Direct browser support for ES modules can reduce build-tool dependence in suitable projects, while Node.js module interoperability is complex because its existing CommonJS behavior differs from static ES modules. PWAs packaged as TWAs could let teams distribute one web application through the Play Store, but platform policies and technical requirements mean the process is not simply submitting a URL. New CSS capabilities should be used deliberately: nesting can make styles concise, but excessive nesting can create hard-to-maintain selectors.
Data Points: Promise.allSettled proposal stage: Stage 4 - The hosts describe it as likely to be included in the language; it waits for all promises to settle, whether fulfilled or rejected. Promise.any proposal stage: Stage 1 - At the time of the discussion, the hosts describe it as an early proposal that waits for a promise to fulfill. UC Browser for Android usage: Almost 3.5% globally - Mentioned while discussing the browser support landscape for native ES modules. Minimum Lighthouse score for a TWA: 80 out of 100 - The hosts cite this as a performance requirement for publishing a trusted web activity in Google Play. TWA app icon size: 512 pixels - A 512-pixel icon is among the requirements listed for a PWA packaged as a trusted web activity. Chrome support for CSS scroll snapping: Version 69 - The episode cites Chrome 69 as supporting scroll snapping; support is described as varying in some other browsers. Subgrid availability outlook: Earlier than 2020 was considered possible - Following an update about Firefox development, the hosts revise their expectation that subgrid might be about a year away. Wedding described by a host: About 60 attendees and 3 songs - Opening personal conversation: the bride and groom performed three songs at an intimate wedding.
Pivotal Quotes: "I think this is a perfect example of the browser taking over something that it should be taking over." — Host: On native lazy loading replacing custom libraries and code. "Anything that makes your applications be faster without you having to do very much is a huge one in my book." — Host: Explaining why native browser features such as lazy loading are valuable. "Do you want to build your app a couple of times or do you want to build it once?" — Host: Making the case for using PWAs and trusted web activities to reach app users with a web-based implementation.
Implications: Developers should track browser-native features that can replace custom code, while checking actual compatibility and requirements before adopting them. PWAs and richer CSS capabilities may streamline delivery and interface work, but careful implementation and maintainable practices remain essential.
About Syntax - Tasty Web Development Treats
View all episodes from Syntax - Tasty Web Development Treats