Skip to content

When doing CSSStyleValue.parse(), what should throw vs return null? #305

Closed
@tabatkins

Description

@tabatkins

The old (very incomplete) definition of CSSStyleValue.parse() said that things returned null if they didn't parse. I've rewritten it in a proper algorithmic style, and identified three possible error locations. Which should throw, and which should return null? (Currently, the spec throws for all of them.)

  1. Property name isn't an ident.
  2. Property name is an ident, but not recognized as a CSS property.
  3. Valid property name, but property value doesn't match the grammar of that property.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions