Proxy vs Object.defineProperty
Why Vue3 switched from Object.defineProperty to Proxy, and what makes Proxy a more capable interception mechanism.
Why Vue3 switched from Object.defineProperty to Proxy, and what makes Proxy a more capable interception mechanism.
What higher-order functions are, how map, filter, and reduce work under the hood, and how to write your own.
How closures can unintentionally hold references and cause memory leaks, with patterns to avoid them.
Reinterpreting Vue's default, named, and scoped slots as function calls to build a clearer mental model.
Practical uses of bitwise operators in JS: permission flags, fast integer conversion, and other real-world patterns.
Common bugs triggered by Chinese input methods in browser text fields and how to handle compositionstart and compositionend events.
title: “Copying Text in the Browser” description: “Different approaches to implementing clipboard copy on web pages, including the modern Clipboard API.” date: 2022-03-15 11:33:00 +0800 categories:...
The difference between git revert and git reset, and when to use each for rolling back commits.