3 ms·
Things have changed since then. For example, AJAX now is much simpler to use than it used to be. async function printExampleCom() { let response =
by GlitchMr 8y ago
Things have changed since then. For example, AJAX now is much simpler to use than it used to be.
async function printExampleCom() {
let response = await fetch("https://www.example.com/")
// NB: Response has other methods like json.
console.log(await response.text())
}
printExampleCom()
You need a polyfill for `Request` for Safari and Internet Explorer (but not Edge), but that's about it.
- shams93 8y agoYeah actually I stead of so much focus on frameworks it's better to focus on better polyfill implementations. It's only a temporary issue in many cases but the larger web does move slowly and then stardards like web components sometimes take a deacde or more to be fully baked. Wasm based polyfill would enable more browser maker innovation and competition without leading to slow and bloared pages for all but one device.
- Spivak 8y agoWhat's the point of polyfilling a nice API when you could just have a nice API to start with which leverages native functions when present? They don't seem to be philosophically different. Or stated differently, "jQuery is just a JS polyfill for browsers that don't support native jQuery yet."
- Spivak 8y agoIs there really much of a philosophical difference between a polyfill that exposes a common API and emulates when not present and a library that exposes a common API and uses native functionality when present?