Take you hand-in-hand for 10 minutes to create a simple Markdown editor

preface In my recent project, I need to implement a similar framework of reamark down: My first thought is that if you can use excellent open source, you must use open source. After all, you can't always build wheels repeatedly. So I asked a lot of friends in my front-end group. They all gave me a bunch of open-source markdown editor projec ...

Added by pagegen on Mon, 07 Mar 2022 02:33:00 +0200

I optimized the progress bar and improved page performance by 70%

preface Hello, I'm zero one. Recently, I'm going to talk about code in the group, so I sorted out the business code before the next project. In the process of combing, I saw a progress bar component written very well, which reminds me of the progress bar code I wrote when I first started preschool. Compared with this, it's really too far away ...

Added by Frag on Mon, 07 Mar 2022 02:26:59 +0200

Handwritten Promise? ∑(っ ° Д °;) It's so simple

preface Unknowingly, it has been delayed for five months. This year (lunar calendar) is really busy. I'm so busy that I'm not interested in blogging. Recently, on a whim, I realized a Promise according to my own ideas. I wrote it quickly and the code is quite simple. I'd like to record and share it as the opening blog post in 2022. Initial re ...

Added by rageh on Mon, 07 Mar 2022 02:16:00 +0200

Agent model of design pattern combing

Sorting is always from easy to difficult, and the agent mode is not difficult to understand, because the front-end partners are commonly used agents. Today, sort out the so-called agent mode What is the agent model Agent mode is very common. Not only do we see the so-called agent mode in our life, brokers, secretaries, lawyers, including in ...

Added by jds580s on Sun, 06 Mar 2022 17:57:31 +0200

JavaScript form validation

Preface: the form verification we talked about this time uses the contents of the previous articles, which is more difficult than the previous ones. I will explain it in detail in the form of comments in the code. catalogue I Simple form validation Verification method 1: Verification method 2: II Regular verification I Regular rules Cont ...

Added by gameshints on Sun, 06 Mar 2022 17:13:17 +0200

[Bao Zhen] my first webpack optimization, the first screen rendering from 9s to 1s

Hello, I'm Xiaobai. This article is based on vue2. It takes about 3 minutes to read the full text.When it comes to webpack optimization, most people may be tired of it. It's just those moves. I've read many similar articles before, but I haven't really started it. Here's what I practiced with the company's projects. The loading speed of the fir ...

Added by wattee on Sun, 06 Mar 2022 14:45:09 +0200

Detailed explanation of JavaScript event flow

DOM event flow To understand the event flow, we must first understand three points: Elements are not independent, they are connected in seriesAfter a single element triggers an event, it will affect other elementsMode of event flow: event capture (proposed by Netscape) and event bubbling (proposed by IE) Let's take the above figure as ...

Added by pbjpb on Sun, 06 Mar 2022 13:48:01 +0200

JavaScript form validation & regular expression & secondary linkage

  catalogue 1, Concept of form validation Form validation is one of JavaScript's advanced options. The form data verified by JavaScript include: 2, Common functions and events of form verification Common functions Common events 3, Regular Basic regularity Basic case Password level Login authentication 4, Secondary linkage ...

Added by vcarter on Sun, 06 Mar 2022 12:59:56 +0200

Common methods of Object in JavaScript

Common methods of Object Object.getPrototypeOf() Object. The getprototypeof method returns the prototype of the parameter object. This is the standard way to get prototype objects. var F = function () {}; var f = new F(); Object.getPrototypeOf(f) === F.prototype // true Prototypes of several special objects // The prototype of an empt ...

Added by chiaki*misu on Sun, 06 Mar 2022 12:50:19 +0200

JS advanced object-oriented chapter (including this judgment rule, deep / shallow copy, prototype / prototype chain, etc.)

1, Cognition object 1. What is it An object is a collection of key value pairs (k:v), which represents the mapping relationship between attributes and values The order should be considered in the array. The object does not consider the order, but depends on the mapping relationship 2. Object syntax k and v are separated by colons, each ...

Added by UKlee on Sun, 06 Mar 2022 11:26:16 +0200