cannot load firefox extension
I wrote a simple firefox extension: only one content script which has only one line of code: console.log(“hello world”); I was confident it was all right. Then, I typed “about:debugging” […]
I wrote a simple firefox extension: only one content script which has only one line of code: console.log(“hello world”); I was confident it was all right. Then, I typed “about:debugging” […]
How to define a Javascript object? The key of an object can be an identifier/symbol(an identifier is a continuous alphabeta/number/_ that does not begin with a number), a number, or […]
When you are debugging your javascript code(so called page script) of your website, you may use console.log to write the value of a variable to console. You can press F12, […]
When browser starts to load a web page, document.readyState===loading. When DOM is constructed, document.readyState==interactive. When page is fully loaded, i.e., the images/css are all loaded, document.readyState===complete. After document.readyState becomes interactive, […]
When you click somewhere on a web page, the system will create a click event. You should realize that you are probably not clicking on single DOM node although you […]
To get the event listeners bound to an element in Firefox, just right-click on the element, click the “Inspect” menu item, then click the “event” badge next to the element […]
After writing your favorite Firefox extension, you must know how to load it into Firefox: Type “about:debugging” in the address bar of your Firefox browser and press enter. Click “This […]
We’ve talked about the event model of javascript. Related to this topic is the usage of preventDefault(),stopPropagation , return false, returnValue=false, cancelBubble=true, which is very confusing. Among these, preventDefault() is […]
You may have known quite a few methods to bind a handler to the click event on an element, two of which are using the onclick attribute and the onclick […]
I have a need to remove multiple lines except the first line in a string. For example, “line1\n\line2\nline3” should be converted to “line1”. At the beginning, I used the following […]