4 ms·
> It's not like JS is specialized in some very small niche by design -- like e.g. COBOL is. Uhh, what? You don't consider "programatically manipulate the DOM i
by thehardsphere 9y ago
> It's not like JS is specialized in some very small niche by design -- like e.g. COBOL is.
Uhh, what? You don't consider "programatically manipulate the DOM in the browser" to be a niche?
- pier25 9y agoAccessing the DOM is not really part of the language specification, but the browser API, no?
- thehardsphere 9y agoAnd the "Browser API" was invented to do what, exactly? And by what mechanism was said API exposed to developers? And whose cocktail napkin was the specification written on?
- coldtea 9y ago>And the "Browser API" was invented to do what, exactly? Whatever it was inveted to do is totally irrelevant, as the "browser API" is not Javascript the language/syntax but just an API (library/module). In fact you could trivially implement it in all kinds of programming languages.
- coldtea 9y agoThere's nothing about JS as a language meant specifically to "programatically manipulate the DOM in the browser". Anything it does related to that is just simple library code and methods on the "document", "element", etc objects -- and that's only when run in the browser where those are available (automatically "imported" let's say). Node doesn't even have the "document" object.