Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use JavaScript Framework Vanilla JS

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

The use of JavaScript framework Vanilla JS, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

VanillaJS is a fast, lightweight, cross-platform JavaScript framework. We can use it to build powerful JavaScript applications.

Introduction of VanillaJS

VanillaJS is small and intuitive.

Which companies have adopted VanillaJS? Many, many, here are just the most famous of them:

Facebook

Google

YouTube

Yahoo

Wikipedia

WindowsLive

TwitterAmazon

LinkedIn

MSN

EBay

Microsoft

Tumblr

Apple

Pinterest

PayPal

Reddit

Netflix

StackOverflow

In fact, more sites use VanillaJS than jQuery, PrototypeJS, MooTools, YUI and GoogleWebToolkit combined.

Modularization of VanillaJS

VanillaJS includes the following modules, and you can download and install only the modules you need to improve performance.

Core function

DOM (traversal / selector)

Prototype-based object system

AJAX

Animation

Event system

Regular expression

Function as the first kind of object

Closure

Mathematics library

Array library

String library

Start using

VanillaJS is one of the lightest javascript frameworks in the world. With our product deployment strategy, your user's browser loads VanillaJS into your browser before sending a request to your site.

To use VanillaJS, simply add this line to the HTML of the application:

When you deploy your application, use this faster approach:

You read it right! Without any code, VanillaJS is so popular that all browsers built it into it ten years ago.

Performance comparison

See how fast VanillaJS is:

Get DOM elements according to ID

Frame code times per second VanillaJSdocument.getElementById ('test-table'); 12137211Dojodojo.byId (' test-table'); 5443343PrototypeJS$ ('test-table') 2940734ExtJSdeleteExt.elCache [' test-table']; Ext.get ('test-table'); 997562jQuery$jq (' # test-table'); 350557YUIYAHOO.util.Dom.get ('test-table'); 326534MooToolsdocument.id (' test-table'); 78802

After reading the above, have you mastered how to use the JavaScript framework Vanilla JS? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report