(getting a real history here is almost impossible, so take these examples)
All those things were always possible - but differed from browser to browser.
Today, you don't need those libraries any more. Modern browsers support everything we talked about.
Well, except IE11. But for that, we have polyfills. π
A polyfill detects if a browser supports a feature like window.fetch
, and if that is missing, shims an alternative implementation in place of the original functionality.
A ponyfill acts like a polyfill, but does not inject itself in place of a missing functionality, but exports either the original implementation or a shim.
This is much less disruptive - if you have the choice, prefer ponyfills to polyfills.
You can polyfill missing functions, but you can't polyfill unsupported syntax.
The idea behind it:
a state machine
We have found ways to use modern standards in all browsers (at some cost, but that's unavoidable)
Reads & writes like JavaScript, but has a powerful type system
Can be run in the JVM or transpiled to JavaScript
OCaml dicalect that transpiles to JavaScript
a way of writing JavaScript that looks shockingly like HTML
We can also write Syntax that isn't even part of any standard yet!
You won't be able to polyfill or transpile real "Browser" features like multithreading using WebWorkers.
Source: heise.de
(talk to me)