Implementation Principle of Pull-down Refresh Implementation of pull-down refresh is mainly divided into three steps: Monitor the native touchstart event and record the value of its initial position, e.touches [0]. pagey; Monitor the native touchmove event, record and calculate the difference between the current sliding position value and the initial position value. when the difference ..
Category : html5
It is difficult to debug the mobile terminal. Most of the time, when we are developing the mobile terminal, we use the mobile phone simulator to debug it on the PC terminal first. We will test it on the browser of the mobile terminal only after there is no problem. At this time, if there ..
This week’s interview questions list: What is XSS attack and what kinds of XSS attacks can be divided into? How do we prevent XSS attacks? How do I hide an element in a page? What is the principle of browser event proxy mechanism? Why is there an error in setTimeout countdown? 11. What is XSS ..
This week’s interview questions list: What is closure? What is the function of closures? Implement Promise.all method What are the ways to load js scripts asynchronously? Please implement a Flattened Deep function to flatten nested arrays What are the characteristics of iterated objects? More quality articles to stamp on: https://github.com/YvetteLau/ … 15. What is closure? ..
This week’s interview questions list: Implement Promise.race method JSONP Principle and Its Simple Implementation Implementation of an Array De-duplication Method What are the methods of floating? Writing a General currying Function More quality articles to stamp on: https://github.com/YvetteLau/ … 20. implement Promise.race method In realizationPromise.raceBefore the method, we first need to knowPromise.raceThe function and characteristics ..
This year, major companies have reduced HC and even adopted “layoff” measures. Under such a big environment, it is necessary to make more efforts to get a better job. This article selected 20 to large factory interview questions, when reading, we suggest not to look at my answer first, but to think about it first. ..
This week’s interview questions list: What is the basic idea of prototype chain inheritance? What are the advantages and disadvantages? What is the basic idea of borrowing constructors and combinatorial inheritance? What are the advantages and disadvantages? What is the basic idea of prototype inheritance? What are the advantages and disadvantages? What is the basic ..
This week’s interview questions list: Stringify Parse Implementing an Observer Mode What are the ways to center an element horizontally and vertically using CSS What are the differences between ES6 module and CommonJS module? More quality articles to stamp on: https://github.com/YvetteLau/ … 31. Achieving aJSON.stringify JSON.stringify([, replacer [, space])The method is to convert a JavaScript ..
scaffold vue-cli,create-react-appăreact-native-cliThese are excellent scaffolds. Through scaffolds, we can quickly initialize a project without having to configure it step by step from scratch, effectively improving the development experience. Although these scaffolds are excellent, they are not necessarily suitable for our actual application. We can customize a scaffold (or company-wide scaffold) to improve our development efficiency. ..
Translation: Liu Xiaoxi Original link:https://devinduct.com/blogpos … What is Proxy Usually, when talking about JavaScript language, we are talking about the new features provided by ES6 standard, and this article is no exception. We will discuss JavaScript proxies and their functions, but before we go into further research, let’s first look at what Proxy is defined. ..
Translation: Liu Xiaoxi Original link:https://css-tricks.com/unders … More articles to stamp: https://github.com/YvetteLau/ … There are some small partners, for JavaScriptreduceThe method is not fully understood. Let’s look at the following two pieces of code: const nums = [1, 2, 3]; let value = 0; for (let i = 0; i < nums.length; i++) { value += ..
Translation: Liu Xiaoxi Original link:https://dmitripavlutin.com/7- … The length of the original textVeryLong, but the content is too attractive to me, still can’t help but to translate it. This article is very helpful for writing reusable and maintainable React components. But because of the length is too long, I had to split, this article focuses onSRP, ..