# In defense of polyfills

DevFeed: [In defense of polyfills](<https://devfeed.tech/articles/in-defense-of-polyfills-52171.md>)

Original publisher: [Read original article](<https://lea.verou.me/blog/2026/polyfills/>)

Author: Lea Verou

Published: 2026-07-13T00:00:00Z

Content type: opinion

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [Web platform](<https://devfeed.tech/topics/web-platform.md>), [web-standards](<https://devfeed.tech/topics/web-standards.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [library](<https://devfeed.tech/tags/library.md>), [polyfills](<https://devfeed.tech/tags/polyfills.md>), [web-platform](<https://devfeed.tech/tags/web-platform.md>), [web-standards](<https://devfeed.tech/tags/web-standards.md>), [whatwg](<https://devfeed.tech/tags/whatwg.md>)

## AI overview

An opinion defending polyfills argues that their benefits for the Web generally outweigh rare cases where they can constrain the design space of native APIs. It discusses the tension between polyfillability and preserving flexibility in Web platform standards.

## Source excerpt

If you're a web developer, you may find the title baffling. "Polyfills need defending? Who's against them?!" you might ask. Two weeks ago, I'd be in the same boat. Polyfills and I go way back. I dug up a JSConf EU talk of mine from 2011 on exactly this topic. Trying not to think about how young I look here 😅 One of the few opinions I have held strongly over the years is that polyfills are a net positive for the Web, and the good outweighs the rare failure cases where polyfills became too popular, too soon, and restricted the design space for the native API. As with most things in life, it's all about the cost-benefit. We don't stop flying planes because crashes happen. We do a post-mortem and figure out how we can prevent the same accident from happening again. And crucially, the point of a post-mortem is to find the root cause -- not to ground the entire fleet. Don't get me wrong, concerns about polyfills are well-intentioned. They come from implementors and standards folks who want to preserve the design flexibility to build the best API surface possible -- a goal I share deeply. Being both a spec editor and a library author, striking that balance is something I navigate all the time. Still, I was under the impression that seeing polyfills as a net positive was the consensus view of the web standards community as a whole. That while we may not have consensus on the specific tradeoffs or solutions, we see polyfilling as a good thing and we generally do want web platform features to be polyfillable. So, you can imagine my surprise when in a recent WHATWG meeting where I presented a proposal for extending mutation observers to observe shadow root attachment, Anne van Kesteren expressed the view that polyfilling is harmful. It's important to note that Anne is not some rando. He is the main active editor of most WHATWG specs (HTML, DOM, Fetch, import maps, etc.), a WebKit engineer at Apple, and has tremendous overall influence on the direction of the Web platform. I had