js event loop
console.log('script start')
setTimeout(function(){
console.log('setTimeout')
},0)
Promise.resolve()
.then(function(){
console.log('promise1')
})
.then(function(){
console.log('promise2')
})
console.log('script end')
Running results of the above code
script start
script end
promise1
promise2
setTimeput
Microsoft Edge, Firefox 40, iOS S ...
Posted by radarhill on Fri, 11 Feb 2022 08:33:04 +0100
Realize a simple version of Vue router from zero, which is too easy to understand
1. Meaning: No matter what address the browser visits, the real page visited is always index HTML and vue render different components according to different addresses. Because the real page is unique, the page switching seen by the user is actually the switching of components. This kind of application is called single page application
2. ...
Posted by campsoup1988 on Fri, 11 Feb 2022 06:45:54 +0100
Vue3+Typescript(coderwhy) super detailed learning notes vue3 development basic syntax
(pay attention to whether I can accept the update push)
I Knowledge supplement
1.1. (understand) this in methods
1.1.1. out of commission Arrow function
If we want to use data to return the data in the object in methods, this must have a value, and the data in the data return object should be available through this. ...
Posted by samscripts on Fri, 11 Feb 2022 06:06:30 +0100
es6 export, import, export default commands
ES6 modules are loaded at compile time, and the dependencies of modules can be determined at compile time. ES6 module is not an object, but the output code is explicitly specified through the export command, and then input through the import command.
//ES6 module
import { stat, exists, readFile } from 'fs';
The above code essentially loads t ...
Posted by NogDog on Fri, 11 Feb 2022 05:00:59 +0100
react source code analysis 12 Status update process
react source code analysis 12 Status update process
Video Explanation (efficient learning): Enter learning
setState&forceUpdate
Several ways to trigger status update in react:
ReactDOM.renderthis.setStatethis.forceUpdateuseStateuseReducer
Let's focus on this Setstate and this Forceupdate, hook in Chapter 13
this. Call this in setstat ...
Posted by gsb on Thu, 10 Feb 2022 23:44:36 +0100
Simple realization and thinking of burying point tool based on babel
Relevant knowledge points
What is AST abstract syntax tree
Compilation process of program
Use of AST
Babel's principle
Examples and thoughts of burying points based on babel in personal implementation
What is AST abstract syntax tree
Compilation process of program
What i ...
Posted by gid on Thu, 10 Feb 2022 10:31:32 +0100
Reconstruction technique -- simplifying conditional logic
Most of the functions of the program come from conditional logic, and most of the complexity comes from conditional logic. Sometimes we need to use refactoring to make conditional logic easier to understand. For example:
Explode conditional expressions: handle complex conditional expressionsMerge condition expression: clarify logical combinati ...
Posted by islan on Thu, 10 Feb 2022 09:08:31 +0100
The puppeter of nodejs realizes the code scanning login of JD automation function
Recently, I want to realize a function of JD scanning code, logging in, automatic ordering and automatic rush purchase (ps: realize JD automation function),
!!! This project is purely for learning and commercial use is prohibited
Let me share with you how I can find the corresponding interface and parameters step by step by analyzing JD's web ...
Posted by laide234 on Thu, 10 Feb 2022 09:03:59 +0100
Javaweb---JQuery basics 3
1. Addition, deletion and modification of DOM Internal insertion appendTo(content) a.appendTo(b); Add a to B to the end prependTo(content) a.prependTo(b); Add a to B and add to the front
External insertion insertAfter(content) a.insertAfter(b); Insert a after B insertBefore(content) a.insertBefore(b); Insert a in front of B
replace replac ...
Posted by JParishy on Thu, 10 Feb 2022 08:39:12 +0100
Vue implements in situ editing of table cells
Vue implements in situ editing of table cells
Here are the notes of Vue beginners. Please avoid the old bird. If you are a warm-hearted elder, we earnestly look forward to your valuable comments.
at first
There is a small demand. I hope to read excel files through the browser and modify data on the web page. I checked some JS plug-ins ed ...
Posted by sv4rog on Thu, 10 Feb 2022 07:48:40 +0100