js garbage collection and memory leak
js garbage collection
The Javascript of the browser has an automatic garbage collection mechanism (GC). The garbage collector will periodically (periodically) find out those variables that are no longer in use, and then release their memory. However, this process is not real-time, because it is expensive and stops responding to other operation ...
Added by maniac1aw on Fri, 21 Jan 2022 08:42:14 +0200
In JavaScript, prototype and__ proto__ What's the difference?
This paper focuses on three issues
prototype and proto function and object What happened to new
prototype and proto
First of all, let's talk about what puzzles us in JS, that is, prototype and__ proto__ What the hell is it
__ proto__ Is the so-called prototype in Javascript (here, let's take a specific example to illustrate it)
function ...
Added by zsxdcfv21 on Tue, 18 Jan 2022 22:08:08 +0200
Automated testing - selenium launch browser
In the process of automated testing, when you start the browser through selenium, you may need to load plug-ins (such as firebug for testing, or a plug-in must be added in the product), read user data (your own browser configuration file / browser configuration file directly given by others), and set the browser (do not load pictures, etc.).
S ...
Added by LoneTraveler on Fri, 31 Dec 2021 15:25:26 +0200
A little trick makes it easy for Selenium to deal with scrollbars and element focus
01. JS processing scroll bar
Execute via webdriver_ The script () method executes the JS script operation scroll bar
Right scroll bar
Firefox browser and Chrome browser use different syntax. It is listed in the following area. It looks like Google browser 71 general Firefox
# Firefox browser scrolls to the bottom
js = "var q=document.docume ...
Added by freaka on Tue, 07 Dec 2021 15:11:09 +0200
Canvas Getting Started 6 requestAnimationFrame for Animation
The learning resources for this article come from "Graphics, Animation and Game Development of HTML5 Canvas Core Technologies"
Try not to use setInterval and setTimeout to animate, but rather use the requestAnimationFrame() method to let the browser decide the frame rate on its own.
Because browsers differ in the implementation of ...
Added by dawho9 on Tue, 07 Jul 2020 17:40:43 +0300
canvas tags for HTML5
canvas tags for HTML5
preface
text
What is canvas
Basic use of canvas
canvas element
Rendering context
Test support
canvas drawing concept
Coordinate space
Draw rectangle
Draw path
Draw arc
arc example 1
arc example 2
arc example 3
Add canvas style
fillStyle
strokeStyle
Draw text
Add text sty ...
Added by cresler on Wed, 24 Jun 2020 09:22:11 +0300
Mouse and keyboard operation events
Mouse events
Mouse events are included in the ActionChains class. When importing, you only need to:
from selenium.webdriver.common.action_chains import ActionChains
Import the class to:
Common methods are:
context_click() -- right click
double_click() -- double click
drag_ and_ Drop - drag
move_to_element() -- mouse over an element
cl ...
Added by snipesh0tz on Mon, 01 Jun 2020 04:12:15 +0300
Native js implements addClass,removeClass,hasClass methods
1.hasClass()
//Determine whether a class exists
function hasClass(element, value) {
var cls = value || '';
//\s Matches any white space characters, including spaces, tabs, page breaks, and so on
if (cls.replace(/\s/g, '').length == 0) {
return false; //Returns false when no parameter is returned ...
Added by geroid on Thu, 21 May 2020 19:13:09 +0300
Spring Security automatically kicks off the previous logged-in user, a configuration is complete!
After successful login, automatically kick off the previous login user. Songge first saw this feature inside the button. It was fun at that time.
Once you've done your own development, you've met the same requirements. Just as the recent Spring Security series is being serialized, you can use Spring Security to talk about how this function work ...
Added by bl00dshooter on Thu, 07 May 2020 04:01:23 +0300
How to remove the browser's built-in password saving function?
Previously, there was a bug like this when you logged in. When you click on the sign-in browser will prompt you to "save password". Then if the user accidentally clicks on this "save" when they go online in a field such as an Internet cafe, it will be troublesome. After shutting down and leaving, the ...
Added by kabucek on Mon, 13 Apr 2020 19:33:01 +0300