
addEventListener() - Beau teaches JavaScript
video description
Date: 2022-03-14
Related videos
Comments and reviews: 10
Dislexual
Hey, I don't know if you're willing to help people struggling, but I need it. I can get the code to work just fine in most scenarios, but when I open my HTML from the browser and link it to my JS, my addEventListener is run instantly. I've gone to stackoverflow to look for a solution, but received no help there. Why isn't it waiting for the event before running?
reply
Hey, I don't know if you're willing to help people struggling, but I need it. I can get the code to work just fine in most scenarios, but when I open my HTML from the browser and link it to my JS, my addEventListener is run instantly. I've gone to stackoverflow to look for a solution, but received no help there. Why isn't it waiting for the event before running?
reply
Tommy
I was looking for the explanation of the last parameter of addEventListener, the optional one. Thanks, I think I understand it now! And here's my attempt on trying to explain it with my words: The last parameter decides in which order two events are fired on an event. Innermost(false) or outermost(true) element first - with event bubbling.
reply
I was looking for the explanation of the last parameter of addEventListener, the optional one. Thanks, I think I understand it now! And here's my attempt on trying to explain it with my words: The last parameter decides in which order two events are fired on an event. Innermost(false) or outermost(true) element first - with event bubbling.
reply
GC
When I go to update console I receive this violation and I my console does not update, how can I stop this violation message? [Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. ..............Thank you for your consideration.
reply
When I go to update console I receive this violation and I my console does not update, how can I stop this violation message? [Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. ..............Thank you for your consideration.
reply
Ankit
Hi Beau..Thanks for making all these videos..They are life changing and are really Awesome. I am learning a lot of new things everYday. Just wanna know are there any videos for memory leaks in javscript you did?
reply
Hi Beau..Thanks for making all these videos..They are life changing and are really Awesome. I am learning a lot of new things everYday. Just wanna know are there any videos for memory leaks in javscript you did?
reply
Ms
Hello I need to pass a callback function that takes an argument. like, btn.addEventListener('click', myFunction(arg)); .... but i had some problems with this as the function ran without a click.... any help please
reply
Hello I need to pass a callback function that takes an argument. like, btn.addEventListener('click', myFunction(arg)); .... but i had some problems with this as the function ran without a click.... any help please
reply
Albert
really good, concise explanation of addEventListener(). It's always good to brush up or have a refresher on pure JavaScript concepts after coding so much in a framework such as VueJS.
reply
really good, concise explanation of addEventListener(). It's always good to brush up or have a refresher on pure JavaScript concepts after coding so much in a framework such as VueJS.
reply
SportyPompano
Hey, Thanks so much for this, this video helped so much, I was trying to get the click to do something but I couldn't get it until I saw this video, now it's obvious, thanks.
reply
Hey, Thanks so much for this, this video helped so much, I was trying to get the click to do something but I couldn't get it until I saw this video, now it's obvious, thanks.
reply
Aditya
am trying to make social share buttons, but when I do right click or mouse middle click. JS onClick not executing. can you help? TIA
A piece of code example:
reply
am trying to make social share buttons, but when I do right click or mouse middle click. JS onClick not executing. can you help? TIA
A piece of code example:
reply
Americano
Is there a reason why my code works in Codepen but not in VScode? VScode is working because I am using it on another project. Great videos!!!
reply
Is there a reason why my code works in Codepen but not in VScode? VScode is working because I am using it on another project. Great videos!!!
reply
George
In the last few seconds of your tutorial, how do you then remove the event listener if it is encapsulated in the function()- [code here]-?
reply
In the last few seconds of your tutorial, how do you then remove the event listener if it is encapsulated in the function()- [code here]-?
reply
Add a review, comment
Other channel videos















