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.
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.
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
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.
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?
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:
create a pen and try it yourself thats how you learn you wont get all the answers from youtube itself, get ur ass working in case if u are still waiting for the 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.
There is no requirement to remove an eventListener. You only do it if that will help the purposes of your program. Maybe you want to deactivate a button until a validation is passed.
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?
This is only a basic explanation. You didn't cover passing parameters in the nested function that's located within the parameter of addEventListener. addEventListener(event, function(e) { //code here}, useCapture); I'm sure many people would be curious about where the arugment for the e parameter comes from.
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.
very nice!! i am still confused but i will keep on watching 20 more times.good job
watch 20 different videos instead.
A tip: you can watch movies on KaldroStream. Been using it for watching all kinds of movies during the lockdown.
@Frederick Ahmed Definitely, I've been using Kaldrostream for years myself :D
@Frederick Ahmed yup, I've been watching on KaldroStream for months myself =)
same hhhh
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.
Knowing that I can set multiple event listeners for the same element really helped my self-guided project! Thanks!
This was an extraordinary intro to your course. You really know your audience well, my friend.
had a problem with eventlisteners for the past 2 days and the insight you gave on useCapture really helped fix the problem :)
I got it informative for my fainal exam w/c left 1 day only . many thanks!
Only One topic
But Deep and complete explanation 😎
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]}?
How to make this code work in a browser? I have the same issue as with the video before.
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
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.
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?
what font are you using????
what if I want to set a parameter to my function?
Excellent! Just what I needed! Thanks!
Thank you, you guys really help me to enhance my knowledge
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:
What about useCapture of p = true, and useCapture of p = false (or vice versa), what would be the result ???
Thank you for the explanation
create a pen and try it yourself thats how you learn you wont get all the answers from youtube itself, get ur ass working in case if u are still waiting for the reply💀💀
Great explanation thank you so much !!!
not great even not good but very bad explanation , i didnt understand nothing
@@realcconnect6873 It's actually good if you did not understand nothing. It would be bad if you hadn't understood ANYTHING :)
Excellent clearness
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.
I don't think so, it's that useful! Pretty dumb video! Need improvement, btw!
@@agarsomyoutuber4608 maybe but it really did help, I couldnt get it at all
Why do we need to remove eventListener? when we do not clear normal click functions?
There is no requirement to remove an eventListener. You only do it if that will help the purposes of your program. Maybe you want to deactivate a button until a validation is passed.
vijays code you can do .setAttribute("disabled") = true;
I think you can use arrow function to look more cleaner
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?
If you send me your code I may be able to offer a suggestion. beau@freecodecamp.org
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!!!
Same here . Mine too doesn't work in VScode .
Thank you for this.
oh that code link is very cool! I am trying to add a event listener to a reset button displaying the text the form has been submitted.
beau is the best
It’s took me 10,000 try’s but I got it to work
Still Confused but explained well
very nice thank you Beau
i love you beau !
beast tutorial bro thanks a lot
i learned smthing new
nothing good
Real C Connect true, I forgot it all
the audio quality can be improved. thx
This is only a basic explanation. You didn't cover passing parameters in the nested function that's located within the parameter of addEventListener.
addEventListener(event, function(e) { //code here}, useCapture);
I'm sure many people would be curious about where the arugment for the e parameter comes from.
This is why I came here))
Thank you
☑️☑️
Loved the video thanks
nothing I understand
Thanks
Neste vídeo temos um exemplo de um projeto carrinho de compras que utiliza o addEventListener th-cam.com/video/IBAsDQf-rrw/w-d-xo.html
Thanks bro : )
is this Hashinshin
👍👍
no lorem ipsum?!?!am i în heaven?
but you could build a function to call many times you want the onclick event!!
Can’t even see anything.
TOP
It’s not the best… missing some explanation… It’s only good if u already know that (for refreshing) 😢
Hmmmm
Maybe next time you can try explaining things in english!
hehe myP