Try to implement a simple mvvm with Proxy

A brief overview of Proxy and Reflect Proxy can be understood as setting up a layer of "interception" before the target object, through which the external access to the object must first be intercepted, so it provides a mechanism to filter and rewrite the external access. The original mean ...

Posted by deadparrot on Fri, 19 Jun 2020 12:46:44 +0200

Abort signal: how to cancel asynchronous tasks in JavaScript

By Tomasz Jakut Crazy technology house Original text: ckeditor.com/blog/Aborti... No reprint without permission Sometimes it can be difficult to perform asynchronous tasks, especially when a specific programming language does not allow you to cancel operations that are not started by mistake or are no longer needed. Fortunately, ...

Posted by kustomjs on Mon, 06 Apr 2020 04:14:50 +0200

Using JavaScript script in Java

About Nashorn Nashorn is a javascript engine. Starting from JDK 1.8, nashorn replaced Rhino (JDK 1.6, JDK 1.7) as an embedded JavaScript engine of Java. Nashorn fully supports the ECMAScript 5.1 specification and some extensions. It uses new language features based on JSR 292, including invokedynamic introduced in JDK 7, to compile JavaScript i ...

Posted by jvalarta on Mon, 30 Mar 2020 16:46:52 +0200

How do I add latency to a JavaScript loop?

I want to add a delay / sleep in the while loop: I've tried this: alert('hi'); for(var start = 1; start < 10; start++) { setTimeout(function () { alert('hello'); }, 3000); } Only the first scenario is real: after display, alert('hi ') will wait for 3 seconds, then alert('hello') will be displayed, but then alert('hello ') w ...

Posted by MBK on Thu, 19 Mar 2020 15:52:12 +0100

ECMAscript Object Oriented Foundation

Object-oriented Encapsulation - the ability to store relevant information in objects Aggregation - The ability to store one object within another Inheritance - The ability of class properties and methods derived from another class (or classes) Polymorphism - The ability to write functions or meth ...

Posted by penguinboy on Sat, 14 Mar 2020 03:22:59 +0100

JavaScript function inheritance

With inheritance in ES6, you can use the extends keyword. But what we are talking about here is not this, but several ways of implementing inheritance before ES6. (I) prototype inheritance ECMAScript takes prototype chain as the main method to implement inheritance. The basic idea is to use prototypes to let a reference type inherit the propert ...

Posted by TimSawyers on Thu, 05 Dec 2019 03:36:47 +0100

Review notes on basic Javascript

Introduction to Javascript Basics First of all, we need to know the standards of web pages: HTML is the structure of a web page Css is the expression and beautification of web pages Javascript is the dynamic structure of web page, that is, behavior. This article briefly introduces1. Basic syntax of JS ...

Posted by wama_tech on Sun, 27 Oct 2019 10:39:33 +0100

ES New Proposal: Double Question Mark Operator

To ensure readability, this paper uses free translation instead of literal translation. To read more high-quality articles, stamp the GitHub blog, and over a hundred high-quality articles are waiting for you a year! This week, Daqian World has a draw with prizes: column "Hearing the Wind in the Left Ear" x3, technical book x5. Welcom ...

Posted by en on Tue, 27 Aug 2019 02:08:43 +0200

Question 3 - The Idea and Practice of Converting ES6 Code into ES5

Interview topics: What is the idea of converting ES6 code to ES5 code? Examples: // Before conversion const fn = () => { console.log('The Lion of the Front End'); }; // After conversion "use strict"; var fn = function fn() { console.log('The Lion of the Front End'); }; Answer analysis: ...

Posted by dourvas on Tue, 13 Aug 2019 05:59:15 +0200

Dynamic Features in C#

Original Link: http://www.cnblogs.com/jellochen/p/The-Dynamic-Feature-in-CSharp.html As we all know, C#is a static language just like Java.Before C# 4.0, you want to and Dynamic Language Convenient interoperability (such as Python, Java ...

Posted by furiousweebee on Tue, 23 Jul 2019 18:26:35 +0200