Melin's Blog

Latest posts

See all posts
  • Trying JavaScript `IntersectionObserver` to Link Headings and Navigation
    Long documentation pages often need a table of contents that follows the reader. As the user scrolls, the navigation item for the current section should become active. The tradi...
  • It Turns Out the DOM Has a JavaScript API Called `toggleAttribute()`
    For years, when I needed to work with DOM attributes, I reached for the familiar set: These APIs are everywhere. They are old, stable, and easy to remember. So I assumed that wa...
  • Several Subtle Differences Between Common DOM APIs With Overlapping Functionality
    JavaScript’s DOM APIs often look interchangeable. In many cases, two methods can produce the same visible result, which makes it tempting to treat them as stylistic alternatives...
  • Screen.isExtended, getScreenDetails, and Multi-Display Development
    Modern web apps are increasingly used in workspaces with more than one display: dashboards, trading terminals, presentation tools, support consoles, payment flows, and monitorin...
  • Why `keyCode` Is No Longer Recommended: Understanding `event.key` and `event.code`
    By Zhang Xinxu. Adapted from the original article at zhangxinxu.com. Keyboard events look simple until you try to handle real-world input. For years, many JavaScript examples us...
© 2026 • Melin
Press Esc or click anywhere to close