Question

I very recently found out that VanillaJS (document?) is a library that's just bundled with 99% browsers and isn't exactly native JavaScript (shock of my life). While writing a lib of my own I normally avoid all helpful things, mostly libs. Now I have three questions:

  1. Is VanillaJS still considered a lib?
  2. Is there a way to do anything with the DOM without VanillaJS?
  3. Are major libs based on VanillaJS or native JS (without the document stuff)
Was it helpful?

Solution

It's a joke, or rather, a witty way to make a point. "vanilla X" refers to "X in the most basic fashion" or "X without anything extra", so "Vanilla JS" is JavaScript as exposed by the browser. VanillaJS is native JavaScript. That includes the DOM, various newfangled APIs, the core language features. It excludes third party code, i.e. what one would normally call libraries or frameworks. The people behind it probably want to point out the advantages of doing things this way by framing it like marketing for a third party framework. There is, or at least used to be, a trend in the JavaScript world to throw frameworks at every problem regardless how trivial a solution in "vanilla" JavaScript would be.

Licensed under: CC-BY-SA with attribution
scroll top