Get All Idl Attributes For An Html Element
I know it's possible to get all content attributes on a a standard HTMLElement like this:   const input = document.querySelector('input'); c
Solution 1:
They exist on the prototype, so you can examine the prototype's JS properties:
constgetKeys = obj => obj
  ? Object.keys(obj).concat(getKeys(Object.getPrototypeOf(obj)))
  : [];
console.log(
  getKeys(document.querySelector('input'))
);<input>
Post a Comment for "Get All Idl Attributes For An Html Element"