title: Is there a way to test if an html element can accept an attribute?
body: <p>Ok so i could make an array of elements and test against it but that wouldn't be very practical. </p>
  
  <p>I was wondering if there's a way to do something like:</p>
  
  <p>if (el accepts attrName) do something.</p>
  
  <p>EDIT: I'm referring to this list <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes</a></p>