Recently, Chris's article on Chrome's deprecation of alert()
, confirm()
, and prompt()
sparked a lively developer discussion. The possibility of major browsers disabling core features raised concerns about the web's long-term stability.
Richard Harris's comment resonated strongly: We shouldn't accept breaking changes as an inevitable cost of progress, especially when it undermines the web's established stability. The web's strength lies in its predictability; investments should have lasting value. A transient web, where APIs are discarded at will, is a broken web.
While this specific controversy isn't my primary focus, it highlights a crucial difference between software and the web. My recent experience updating Astro, a framework I enjoy, illustrates this point. A simple update broke my site due to deprecated APIs.
This isn't a criticism of Astro; it's a reminder that frameworks like Astro, React, or others, are not the web. These projects can freely deprecate and change features. However, core web technologies like alert()
, older CSS, and HTML elements are different. They can't be casually deprecated because the web demands predictability. Unlike individual software projects, no single entity controls these fundamental components.
The core issue: alert()
and confirm()
are web features, not Chrome-specific features. Many seem to overlook this distinction.
This underscores the critical importance of web standards. Openly discussing new features before implementation allows for thorough bug fixing and question answering, preventing the irreversible consequences of hasty changes on a platform where features can't simply be deleted. This isn't about criticizing Chrome; it's about recognizing the fundamental difference between software and the open web. Wouldn't you agree?
The above is the detailed content of Stay alert. For more information, please follow other related articles on the PHP Chinese website!