Skip to main content

Posts

Showing posts from December, 2024

Pearl the Slightly-Man

Before you guys jump into conclusion, this is a superhero. To be precise, slightly-hero. But instead of having too much flair, Slightly-Man has power—slightly. Slightly-Man was born Pearl Grey Babushkovinovich Tea . His peculiar name was indeed given by his parents which were fictional to begin with. Pearl is a construction worker, a hardly working man in random construction site. Anybody who called him Pearl would consistently have pulpy face for reasons unknown. Born and raised in a barn, Pearl graduated from a lot of non-academic institutions. If waddling away slowly was considered graduation, then yes. He has the wit of a crow combined with five melted-together humpback whale tacticians and the strength of a bull, if the bull was a human male with no specific training in any sport. After serving pizza to his fellow workers at the construction site, he knew that he'd be perfect as a public servant. He knew it because the blokes said so, "Hey, you're grea...

How to Remove Listener from addEventListener Method and on- Event Handler

addEventListener : Using removeEventListener For the structure of addEventListener , here's the documentation at MDN EventTarget: addEventListener For the structure of removeEventListener , here's the documentation at MDN EventTarget: removeEventListener Let's use click event for this example. // The button element. const myButton = document.getElementById("myButton"); // The function being invoked for the click event of an element (button). const clickFunction = (e) => { console.log("CLICK!"); console.log(e); }; // Assign the trigger for the button: addEventListener. const assignClickTrigger = () => { myButton.addEventListener("click", clickFunction); }; // Remove the trigger from the button: removeEventListener. const removeClickTrigger = () => { myButton.removeEventListener("click", clickFunction); }; /* // Now we can use assignClickTrigger and removeClickTrigger. // For activating the l...

Shady and Shadowy

We were discussing bunch of some things. Starting from a scam I noticed on some legitimate platform, right. So, after we both roasted the modus operandi with me tracking down some evidences and analyzing them, then I asked this.