Message from JavaScript discussions

September 2018

— Ye, okay, will be good

— 

Why is getElementsByClassName more performant than querySelectorAll according to jsperf. Isnt it supposed to be the other way around?

— determin1st

— I dont know, maybe it's a wrapper for querySelectorAll. depends on how browser-makers implemented it.

Message permanent page

— It doesnt matter if you dont do any engine or lib..

— A node list is static a htmlcollection is live. I'm pretty sure querySelector should be faster

— What is callback. Fonction ??

— A callback is a function you pass as a parameter to another function which will call your callback function after it's done

Message permanent page

— Or after some condition

— But why do that ?

— Why i need to pass a fonction like a parameter for other function ??

— For asynchronous functions where you don't control when the function is done, you can pass the callback, and it will be called when it's done

Message permanent page