4 ms·
I think the way it's done is correct, an object passed as a parameter with key value pairs for attributes seems a lot more logical.
by jamil7 3y ago
I think the way it's done is correct, an object passed as a parameter with key value pairs for attributes seems a lot more logical.
- mattigames 3y agoMaybe, but I bet this way would be slightly faster, because the library wouldn't have to loop through keys if they write functions for all the most common attributes (href, rel, className, type, etc)