What is VanillaJS?
I have one simple question, that got stuck in my mind for a few days: What is VanillaJS? Some people refer to it as a framework, you can download a library from the official pages.
But when I check some examples or TodoMVC, they just use classic raw JavaScript functions without even including the library from the official pages or anything. Also the link "Docs" on the official webpage leads to the Mozilla specification of JavaScript.
My question is: Is VanillaJS raw JavaScript? And if yes, why people refer to it as "framework" when all you need is a browser without any special included scripts?
I am sorry for a probably stupid question but I have no idea what people are talking about when they say "VanillaJS".
This is VanillaJS (unmodified):
// VanillaJS v1.0
// Released into the Public Domain
// Your code goes here:
As you can see, it's not really a framework or a library. It's just a running gag for framework-loving bosses or people who think you NEED to use a JS framework. It means you just use whatever your (for you own sake: non-legacy) browser gives you (using Vanilla JS when working with legacy browsers is a bad idea).
Using "VanillaJS" means using plain JavaScript without any additional libraries like jQuery.
People use it as a joke to remind other developers that many things can be done nowadays without the need for additional JavaScript libraries.
Here's a funny site that jokingly talks about this: http://vanilla-js.com/
VanillaJS is a term for library/framework free javascript.
Its sometimes ironically referred to as a library, as a joke for people who could be seen as mindlessly using different frameworks, especially jQuery.
Some people have gone so far to release this library, usually with an empty or comment-only js file.
链接地址: http://www.djcxy.com/p/12382.html上一篇: 在重定向到ASP.NET中的其他页面时,Confirm Box不起作用
下一篇: 什么是VanillaJS?