examples/dist/common.js
function (node, name, expected) {
    {
      if (!isAttributeNameSafe(name)) {
        return;
      }
      if (!node.hasAttribute(name)) {
        return expected === undefined ? undefined : null;
      }
      var value = node.getAttribute(name);
      if (value === '' + expected) {
        return expected;
      }
      return value;
    }
  }
function (node, name, expected) {
    {
      if (!isAttributeNameSafe(name)) {
        return;
      }
      if (!node.hasAttribute(name)) {
        return expected === undefined ? undefined : null;
      }
      var value = node.getAttribute(name);
      if (value === '' + expected) {
        return expected;
      }
      return value;
    }
  }
function ( node , name , expected ) { { if ( ! isAttributeNameSafe ( name ) ) { return ; } if ( ! node . hasAttribute ( name ) ) { return expected === undefined ? undefined : null ; } var value = node . getAttribute ( name ) ; if ( value === '' + expected ) { return expected ; } return value ; } }
Get the value for a attribute on a node. Only used in DEV for SSR validation.
The third argument is used as a hint of what the expected value is. Some
attributes have multiple equivalent values.
Get the value for a attribute on a node . Only used in DEV for SSR validation . The third argument is used as a hint of what the expected value is . Some attributes have multiple equivalent values .