Melin's Blog

Latest posts

See all posts
  • On a Sunday afternoon, while sitting in my study, I suddenly wondered: if an element, such as a `<label>` element, could respond to the state changes of a radio button or checkbox no matter where it is on the page, wouldn’t that make it possible to handle almost every click interaction on the page in one shot? That would be seriously awesome!
    But is it actually that awesome? Let’s take a closer look. The Starting Point: Most Click Interactions Are State Toggles If we strip many common click interactions down to their...
  • 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...
© 2026 • Melin
Press Esc or click anywhere to close