code: function xmlGetAttribute(node, name) {
      // TODO(mesch): This should not be necessary if the DOM is working
      // correctly. The DOM is responsible for resolving entities, not the
      // application.
      const value = domGetAttribute(node, name);
      if (value) {
          return he.decode(value);
      } else {
          return value;
      }
  }
docs: Wrapper function to access attribute values of template element nodes. Currently this calls he.decode because in some DOM implementations the return value of node.getAttributeValue() contains unresolved XML entities, although the DOM spec requires that entity references are resolved by te DOM.