Tagged articles
21 articles
Page 1 of 1
Full-Stack Cultivation Path
Full-Stack Cultivation Path
Oct 9, 2024 · Frontend Development

How the New JavaScript ?= Operator Can Eliminate Try‑Catch Boilerplate

JavaScript’s upcoming safe‑assignment operator ( ?= ) lets developers handle errors without traditional try‑catch blocks, reducing nesting, improving readability, and enabling seamless integration with async/await, Symbol.result, and recursive error handling, as demonstrated through multiple code examples and a polyfill link.

Error HandlingJavaScriptPolyfill
0 likes · 5 min read
How the New JavaScript ?= Operator Can Eliminate Try‑Catch Boilerplate
Code Mala Tang
Code Mala Tang
Aug 22, 2024 · Frontend Development

Can the New ?= Operator Eliminate Try‑Catch in JavaScript?

An upcoming ECMAScript proposal introduces the safe assignment operator ?=, which returns a [error, result] tuple to streamline error handling, reduce try‑catch nesting, support custom Symbol.result, work with async/await, and can be polyfilled for older browsers.

ECMAScript ProposalPolyfillSafe Assignment Operator
0 likes · 6 min read
Can the New ?= Operator Eliminate Try‑Catch in JavaScript?
CSS Magic
CSS Magic
Aug 12, 2024 · Frontend Development

Fix the Broken ChatGPT Web Interface with a Custom User Script

When a new ChatGPT web release triggers a "Oops, an error occurred! (Try again)" message on older browsers, the article explains how the missing Array.prototype.toSorted() method causes the failure and guides readers through creating a Tampermonkey user script that injects a polyfill to restore functionality.

ChatGPTJavaScriptPolyfill
0 likes · 11 min read
Fix the Broken ChatGPT Web Interface with a Custom User Script
HelloTech
HelloTech
May 16, 2024 · Frontend Development

Vite Legacy Plugin for Browser Compatibility

The Vite Legacy Plugin adds browser compatibility to Vite projects by using Babel to transpile modern JavaScript, generating polyfill chunks, and offering configurable target browsers, while allowing developers to control whether legacy or modern bundles are produced through dedicated config, generation, and post‑build plugins.

LegacyPolyfillVite
0 likes · 5 min read
Vite Legacy Plugin for Browser Compatibility
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Dec 20, 2022 · Frontend Development

How to Slash Frontend Bundle Size: Babel, Polyfills, Tree‑Shaking & Duplicate Dependency Fixes

This article examines why bundle size matters for front‑end performance and provides a step‑by‑step guide to reducing Webpack output by optimizing Babel polyfills, leveraging @babel/preset‑env, using @babel/runtime, applying tree‑shaking, and eliminating duplicate dependencies.

Frontend OptimizationPolyfillTree Shaking
0 likes · 12 min read
How to Slash Frontend Bundle Size: Babel, Polyfills, Tree‑Shaking & Duplicate Dependency Fixes
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 15, 2022 · Frontend Development

Understanding requestAnimationFrame: Usage, Timing, Performance, and Compatibility

This article explains the requestAnimationFrame API, demonstrates basic and cancelable animation examples, discusses its execution timing within the browser frame lifecycle, compares its performance to setTimeout, covers compatibility and polyfills, and shows how to wrap it in a React hook for practical use.

BrowserJavaScriptPolyfill
0 likes · 11 min read
Understanding requestAnimationFrame: Usage, Timing, Performance, and Compatibility
Sohu Tech Products
Sohu Tech Products
Sep 28, 2022 · Fundamentals

New ECMAScript 2023 Array Proposals: Non‑Destructive Methods, Grouping, Find‑From‑Last, and fromAsync

The article explains the upcoming ECMAScript 2023 proposals—including non‑destructive array methods (toReversed, toSorted, toSpliced, with), array grouping (group, groupToMap), reverse‑search methods (findLast, findLastIndex), and the asynchronous constructor Array.fromAsync—detailing their stages, usage examples, polyfills, and type signatures for modern JavaScript development.

ECMAScriptJavaScript proposalsPolyfill
0 likes · 14 min read
New ECMAScript 2023 Array Proposals: Non‑Destructive Methods, Grouping, Find‑From‑Last, and fromAsync
KooFE Frontend Team
KooFE Frontend Team
Sep 25, 2022 · Frontend Development

Mastering Array.fromAsync: Async Iteration Made Easy in JavaScript

This article introduces the Stage‑3 ECMAScript proposal Array.fromAsync, explains why it’s needed for async iterables, shows its usage with async, sync, and array‑like inputs, provides real‑world examples, and offers a polyfill implementation for current environments.

Array.fromAsyncJavaScriptPolyfill
0 likes · 9 min read
Mastering Array.fromAsync: Async Iteration Made Easy in JavaScript
DaTaobao Tech
DaTaobao Tech
Sep 20, 2022 · Frontend Development

Understanding Intersection Observer API and Its Polyfill Implementation

The article explains how the Intersection Observer API offloads visibility detection from scroll events to improve performance, details its creation, options, callback structure, and entry data, and describes a polyfill that mimics native behavior using event listeners, mutation observers, and geometric calculations for broader browser support.

IntersectionObserverJavaScriptPolyfill
0 likes · 16 min read
Understanding Intersection Observer API and Its Polyfill Implementation
IT Services Circle
IT Services Circle
Apr 20, 2022 · Frontend Development

New Non‑Destructive Array Methods in JavaScript: toReversed, toSorted, toSpliced, and with

JavaScript’s upcoming “Change Array by copy” proposal introduces four non‑destructive array methods—.toReversed(), .toSorted(), .toSpliced(), and .with()—which provide immutable alternatives to existing destructive methods, and the article explains their behavior, usage examples, and polyfills while the proposal is in stage 3.

ArrayECMAScriptJavaScript
0 likes · 6 min read
New Non‑Destructive Array Methods in JavaScript: toReversed, toSorted, toSpliced, and with
Alibaba Terminal Technology
Alibaba Terminal Technology
Apr 9, 2021 · Frontend Development

Master Babel 7: Resolve Common Runtime Errors and Optimize Polyfills

This article explains why Babel 6 and Babel 7 produce typical errors such as "regeneratorRuntime is not defined" and "Cannot find module 'core-js/library/fn/**'", then walks through the roles of @babel/preset‑env, @babel/plugin‑transform‑runtime, core‑js versions, useBuiltIns options, and provides concrete configuration examples for both application and library projects.

PolyfillRuntimebabel
0 likes · 14 min read
Master Babel 7: Resolve Common Runtime Errors and Optimize Polyfills
ByteFE
ByteFE
Apr 7, 2021 · Frontend Development

Promise‑Based JavaScript Animation Library: Design and Implementation

This article introduces a Promise‑based JavaScript animation library, explains how to create sequential animations using async/await, provides polyfills for requestAnimationFrame and es6‑promise, details the Animator class implementation, and demonstrates usage with code examples and easing extensions.

AnimatorJavaScriptPolyfill
0 likes · 11 min read
Promise‑Based JavaScript Animation Library: Design and Implementation
ByteFE
ByteFE
Mar 30, 2021 · Frontend Development

Understanding Babel: Core Functions, AST, Polyfills, and Presets

This article explains Babel's role as a fundamental JavaScript compiler, detailing its parsing‑transform‑printing pipeline, AST structure, core‑js polyfills, preset‑env configuration, and runtime helpers, providing frontend developers with a comprehensive guide to mastering Babel's ecosystem and optimizing bundle size.

ASTJavaScriptPolyfill
0 likes · 13 min read
Understanding Babel: Core Functions, AST, Polyfills, and Presets
Yuewen Frontend Team
Yuewen Frontend Team
Nov 16, 2020 · Frontend Development

Build a Lightweight Carousel with CSS Scroll‑Snap and Minimal JavaScript

This article demonstrates how to replace heavy swiper libraries with a slim, pure‑CSS carousel using scroll‑snap‑type, scroll‑snap‑align, and scroll‑behavior, and adds a small JavaScript polyfill for smooth scrolling and automatic slide rotation, complete with npm packaging and compatibility notes.

CSSCarouselJavaScript
0 likes · 7 min read
Build a Lightweight Carousel with CSS Scroll‑Snap and Minimal JavaScript
vivo Internet Technology
vivo Internet Technology
Jul 15, 2020 · Frontend Development

Babel: JavaScript Compiler – History, Usage, and Advanced Configuration

Babel, originally 6to5, is a JavaScript compiler that transforms modern ES6+ code into browser‑compatible JavaScript using a parser, plugins, and presets like @babel/preset‑env, with configurable polyfill strategies and runtime helpers, enabling developers to target older environments via a simple CLI workflow.

CLIPolyfillTranspilation
0 likes · 21 min read
Babel: JavaScript Compiler – History, Usage, and Advanced Configuration
Tencent Cloud Developer
Tencent Cloud Developer
Nov 29, 2019 · Frontend Development

How to Adapt a JavaScript SDK for IE9, IE8, and IE7 Compatibility

The guide shows how to modify a Webpack‑4 JavaScript SDK—adding Babel symbol handling, using transform‑runtime, employing Flash for IE9 cross‑domain requests, converting ES5 to ES3 with es3ify‑loader, configuring UglifyJs for IE8, polyfilling missing APIs, building a tiny selector engine, and testing on virtual IE7‑IE9 machines.

IE compatibilityJavaScriptPolyfill
0 likes · 21 min read
How to Adapt a JavaScript SDK for IE9, IE8, and IE7 Compatibility
58 Tech
58 Tech
Jul 18, 2018 · Frontend Development

Frontend Architecture of 58 MicroChat: Multi‑Platform Design and Implementation

The article describes the layered front‑end architecture of 58 MicroChat, covering its network, SDK, UI, integration, storage, security, polyfill, and quality‑monitoring modules, as well as the message center design, cross‑platform compatibility strategies, and ongoing quality‑monitoring practices.

MessagingPolyfillQuality Monitoring
0 likes · 12 min read
Frontend Architecture of 58 MicroChat: Multi‑Platform Design and Implementation
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Jul 5, 2017 · Frontend Development

Mastering CSS conic-gradient: From Basics to Stunning Visual Effects

Explore the CSS conic-gradient function in depth—its syntax, differences from linear and radial gradients, practical examples like color wheels, pie charts, animated backgrounds, and polyfill support—while learning how to combine percentages, background-size, and blend modes to create dynamic, cross-browser visual designs.

CSSPolyfillSCSS
0 likes · 10 min read
Mastering CSS conic-gradient: From Basics to Stunning Visual Effects