promise - asynchronous programming tool
This paper understands Promise principle by implementing a simple class, compares Promise with traditional callback, shows Promise's advantages in asynchronous programming, and finally introduces Promise's application in practical development.
I concept
Promise decouples asynchronous operations from callbacks and associates them through execu ...
Added by broomstick on Tue, 04 Jan 2022 01:22:45 +0200
Equality judgment in JavaScript
Equality judgment in JavaScript
There are four equality algorithms in ES2015:
Abstract (non strict) equality comparison (= =)Strict equality comparison (= = =): for array prototype. indexOf, Array.prototype.lastIndexOf, and {case matchingSame value zero: used for% TypedArray% and% ArrayBuffer constructors, as well as Map and Set o ...
Added by bradley252 on Mon, 03 Jan 2022 23:24:30 +0200
JavaScript modular parsing
Comprehensive analysis of JavaScript modularity
Definition: modularization refers to the process of dividing the system into several modules from top to bottom when solving a complex problem. It has a variety of attributes and reflects its internal characteristics. Defining modularity is a way to deal with the decomposition of complex sy ...
Added by LDusan on Mon, 03 Jan 2022 22:57:30 +0200
canvas realizes the picture around the cup to prevent the deformation command in psd
We usually use ps to modify the image through the deformation command to fit it on the cup. How can we make it with canvas?
Examples in ps
The demand I met is to complete the real-time rendering preview of a cup, so I need to realize this bending effect. First I write the code, and then explain the principle
var canvas = document.getEleme ...
Added by xgrewellx on Mon, 03 Jan 2022 22:52:46 +0200
uniapp short video APP continues to be transformed and upgraded: shopping cart and red envelope functions are added
Tiktok: last time we successfully created our first short video App using HbuilderX + uni-app + smart tiktok, the first one, and I named him the skin melon video. Then I used the official demo to make a transformation. Next, let's look at the comparison between our skin and the sound.In fact, there are still some subtle differences, but the sim ...
Added by mickey9801 on Mon, 03 Jan 2022 22:48:30 +0200
Chapter 3 DOM programming of high performance JavaScript
Chapter 3 DOM programming
High performance JavaScript - Nicholas C. Zakas
Operating DOM with JS is expensive, which is usually the performance bottleneck of web applications.
This chapter discusses three types of issues:
Access and modify DOM elementsModifying the style of DOM elements will result in repaint and reflowHandling interact ...
Added by lifeson2112 on Mon, 03 Jan 2022 22:42:46 +0200
Data visualization - ECharts - line chart
introduction:
ECharts is a data visualization chart Library Based on JavaScript, which provides intuitive, vivid, interactive and personalized data visualization charts. ECharts was originally opened by Baidu team and donated to Apache foundation in early 2018, becoming an ASF incubation project.
The most direct and effective way to learn ECh ...
Added by mjax on Mon, 03 Jan 2022 20:28:29 +0200
HTML5 canvas framework fabricjs learning notes - pictures and background
preface
This blog post is the second in the HTML5 canvas framework fabricjs learning notes series - pictures and backgrounds. It mainly introduces how to add picture objects, picture backgrounds and solid color backgrounds to the canvas.
For the introduction, introduction and index of the framework, see Learning notes on HTML5 canvas fram ...
Added by agmorgan on Mon, 03 Jan 2022 20:11:55 +0200
Use and implementation of array find method in js
Use and implementation of array find method in js
find method definition
The find() method returns the value of the first element in the array that meets the conditions of the incoming function. Otherwise, undefined is returned.
find method syntax
arr.find(callback(element [, index[, selfArr]]) {} [, thisArg])
find method parameters
callb ...
Added by stc7outlaw on Mon, 03 Jan 2022 19:57:40 +0200
Ajax is used to realize the three-level linkage of provinces and cities
• for example: normal B/S mode (synchronous) AJAX Technology (asynchronous)
Synchronization: submit the request - > wait for the server to process - > return after processing. During this period, the client browser cannot do anything
Asynchronous: the request is triggered by an event - > processed by the server (at this time, ...
Added by tsilenzio on Mon, 03 Jan 2022 19:54:24 +0200