Comment by sophacles
4 hours ago
When node was new there were many browsers (different rendering and js engines, not just chrome reskins) and standards and "proto standards" were moving very fast. Different browsers and versions would have very different support for CSS directives, tag behavior, etc. This was a real pain in the ass to make a site consistent across different browsers - every other line of code would require a full switch statement based on browser and version it seemed, and all of these things would need updating every time some browser had an update.
The answer to this was something called polyfills, a library that did something as simple as element.center() with just 500 lines of code to make it consistent on all browsers, and all the places you want to center that element are updated by the polyfill authors and your code doesn't need to be touched.
All the sites that weren't using good polyfills broke (or at least looked terrible) for days every time there was a new $browser update.
Since thats the javascript environment node was born into, the style was carried over by inertia and habit, for better and worse.
No comments yet
Contribute on Hacker News ↗