[JS informal learning] - ES6 proxy
Proxy
Proxy is used to create a proxy for an object to modify the default behavior of some operations. It can be understood as setting up a layer of "interception" in front of the target object. External access to the object must first pass through this layer of interception. Therefore, it provides a mechanism for us to filter and re ...
Posted by rsmith on Wed, 15 Dec 2021 13:35:02 +0100
JS basics day6
Review of knowledge points:
Function:
Formal and argument, unequal
Short circuit assignment
String splicing (string splicing is used when many values are returned)
Scope!!!!!!
Global, local and scope are relative (the child function can access the variables of the parent function)
Formal parameter: it is essentially a local variable
pre ...
Posted by zypher11 on Tue, 14 Dec 2021 14:34:21 +0100
Asynchronous component of vue source code analysis
1, Factory function
1 when the component executes_ When the render function is converted to a virtual VNode, the createComponent() function will be executed when a component is encountered, as follows:
function createComponent ( //Line 4184 creates the component Vnode
Ctor, //Ctor: constructor o ...
Posted by MNSarahG on Tue, 14 Dec 2021 06:57:32 +0100
[JavaScript in front-end tutorials] 04_JavaScript process control statement
JavaScript from getting started to mastering video through train:
[1-200] JavaScript video tutorial, from introduction to mastery, with more cases of practice, easy to understand!
[201-300] JavaScript video tutorial, from introduction to mastery, with more cases of practice, easy to understand!
JavaScript process control stat ...
Posted by bawla on Mon, 13 Dec 2021 08:19:57 +0100
String object of JS object
1. Create a String object
var strOb = new String("abcefg");
var strOb = String("abcefg");
var strOb = "abcefg";
Summary: any data type, as long as it is enclosed in quotation marks, is a string object
2. String properties
stringObj.length (String length)
3. Method
3.1) substring position indexOf(string,[index]) / / returns the first ...
Posted by Brentley_11 on Sat, 11 Dec 2021 15:18:53 +0100
The responsive principle of vue is realized through Proxy and Reflect
vue3 implements the response expression through Proxy+Reflect, and vue2 implements it through definePropertyProxyWhat is ProxyProxy is a class added in ES6 to represent proxy.If we want to listen to the operation process of the object, we can first create a proxy object, and then all operations on the object are completed by the proxy object. T ...
Posted by vronsky on Sat, 11 Dec 2021 15:17:14 +0100
Search and modification of DOM
Find:
1. Search by selector: in the future, if the elements are hidden deeply and scattered, the search conditions become very complex, you can search by selector
(1) . find only one element that meets the requirements
a. var an element object = any parent element. querySelector("selector")
& ...
Posted by bsamson on Wed, 08 Dec 2021 18:51:38 +0100
promise and asynchronous programming
promise introduction
Promise is a solution for asynchronous programming, which is more reasonable than traditional solutions (callback functions and events).
What is synchronization?
After the current call is issued, subsequent code cannot be executed before the result is received, and the subsequent code is always online waiting, and synchr ...
Posted by rashu.dr on Tue, 07 Dec 2021 17:08:50 +0100
Javascript learning materials - week2-day5
1, window object
1.BOM Browse object model
In fact, it is some ability to operate the browser
What can we do:
- Get some browser related information (window size)
- Operate the browser for ...
Posted by Caesar on Tue, 07 Dec 2021 05:14:30 +0100
Use of Promise of ES6
(1) Promise
Promise means promise. (it's something that will happen in the future)
(1) What is promise?
In terms of purpose: (1) promise is mainly used for asynchronous computing. (2) You can queue asynchronous operations, execute them in the desired order, and return the expected results. (3) promise can be passed and manipulated between ob ...
Posted by Balu on Fri, 03 Dec 2021 19:46:00 +0100