2 ms·
It's worded as "alternatives", not "equivalents", so API parity isn't a requirement. The fact that `classList.add` has a different interface to `$.fn.addClass`
by lucideer 8y ago
It's worded as "alternatives", not "equivalents", so API parity isn't a requirement.
The fact that `classList.add` has a different interface to `$.fn.addClass` isn't really a big deal—this would be the case with most migrations from one API to another without matching interfaces. The question is of internal functionality—the only thing jQuery "adds" here is being lenient about the param type accepted.