How does getElementsByClassName () work under the hood?

I tried to just cycle through the elements selectively to find the elements of a particular class, but I'm curious if using getElementsByClassName (for applicable browsers) will generally improve performance.

How it works?

I could easily run the test to test the performance, but I'm really curious about what's going on there.

+4
source share

All Articles