All I can think of is "using query string as getenv() for random debug hacks" or "using history as a hack to synchronously reach the structured clone algorithm", neither of which a library should do (but both easily emulatable).
That said, there are other browser APIs that I would love to see available elsewhere:
- window.crypto as an interface over libcrypto
- window.localStorage and window.sessionStorage as an abstraction over temporary files and an in-memory key/value store, respectively
- window.indexedDb for an in-runtime DB à la Erlang Term Storage or MUMPS
- window.opener, window.parent, window.open(), window.postMessage() for inter-process communication
There's a lot to work with here if you get creative.
The first attempt at this was to port the node standard library to the browser via browserify and the like. This tended to create gigantic JS build artifacts and frequently led to runtime errors when developers used an abstraction that just had no equivalent in the browser (like saving something to disk or opening a separate process). The browser is definitely the lowest common denominator of JS runtimes, even if there are a few browser APIs that just don't make sense in a server environment (like window.history)
node 17 is bringing the fetch api to core which to me makes perfect sense. theres definitely no point in node creating their own version of fetch. and fetch is useful on both the browser and server, given that fetch is an easy way to facilitate a client-server connection over http/s. perhaps the same applies to window.crypto.
i think you start to lose the benefit of standardization when: 1. half the api gets repurposed to try to fit a (in some cases, completely subjective) counterpart 2. functionality isn't 1:1