docs: function getAttribute(element, name) {
    assertType(element, Node, false, 'Invalid element specified');
  
    if (!element.getAttribute) return null;
  
    let value = element.getAttribute(name);
    if (value === '') return true;
    if (value === undefined || value === null) return null;
    try {
      return JSON.parse(value);
    }
    catch (err) {
      return value;
    }
  }