function verifyRequiredAttributes(node, emit) {
  if (
    !requiredValues[node.nodeName] ||
    !requiredValues[node.nodeName].attributes
  ) {
    return;
  }
  const requiredAttributes = requiredValues[node.nodeName].attributes;
  const missingAttributes = requiredAttributes.filter(
    (attributeName) => !node.getAttribute(attributeName)
  );
  if (missingAttributes.length > 0) {
    emitMissingValueWarning(
      {
        name: node.nodeName,
        parentName: node.parentNode.nodeName,
        attributes: missingAttributes,
      },
      emit
    );
  }
}
/**
 * Verify and trigger warnings if node required attributes are not set.
 * @param  {Node} node - The node element.
 * @param  {Function} emit - Emit function used to trigger Warning event.
 * @emits  VASTParser#VAST-warning
 */
Verify and trigger warnings if node required attributes are not set.
@param  {Node} node - The node element.
@param  {Function} emit - Emit function used to trigger Warning event.
Verify and trigger warnings if node required attributes are not set . @param { Node } node - The node element . @param { Function } emit - Emit function used to trigger Warning event .
function verifyRequiredAttributes(node, emit) {
  if (
    !requiredValues[node.nodeName] ||
    !requiredValues[node.nodeName].attributes
  ) {
    return;
  }
  const requiredAttributes = requiredValues[node.nodeName].attributes;
  const missingAttributes = requiredAttributes.filter(
    (attributeName) => !node.getAttribute(attributeName)
  );
  if (missingAttributes.length > 0) {
    emitMissingValueWarning(
      {
        name: node.nodeName,
        parentName: node.parentNode.nodeName,
        attributes: missingAttributes,
      },
      emit
    );
  }
}
function verifyRequiredAttributes ( node , emit ) { if ( ! requiredValues [ node . nodeName ] || ! requiredValues [ node . nodeName ] . attributes ) { return ; } const requiredAttributes = requiredValues [ node . nodeName ] . attributes ; const missingAttributes = requiredAttributes . filter ( ( attributeName ) => ! node . getAttribute ( attributeName ) ) ; if ( missingAttributes . length > 0 ) { emitMissingValueWarning ( { name : node . nodeName , parentName : node . parentNode . nodeName , attributes : missingAttributes , } , emit ) ; } }
Verify and trigger warnings if node required attributes are not set.
Verify and trigger warnings if node required attributes are not set .