Skip to content

Throw parse errors instead of just logging them to console #41

Open
@jarek-foksa

Description

@jarek-foksa

This way the parser could be used to validate properties and attributes, e.g.:

let isValidStyleAttributeValue = (value) => {
  try {
    CSSParser.parseAListOfDeclarations(value.trim());  
  }
  catch (error) {
    return false;
  }

  return true;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions