Ok so i could make an array of elements and test against it but that wouldn't be very practical. 

I was wondering if there's a way to do something like:

if (el accepts attrName) do something.

EDIT: I'm referring to this list <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes>