Skip to content

[css-typed-om-1] Interfaces with value iterators need additional attributes and operations #358

@rakuco

Description

@rakuco

The WebIDL spec says: "a value iterator must only be declared on an interface that supports indexed properties".

Another section defines that an interface "supports indexed properties" when it has an indexed property getter and defines an integer-typed attribute named “length”. This then gives an interface with an iterable<V> declaration several operations for free (they come from %ArrayPrototype%) such as forEach() and keys().

With that said:

  • CSSUnparsedValue has an iterable<(DOMString or CSSVariableReferenceValue)> declaration with no length attribute or indexed getter.
  • CSSTransformValue has an iterable<CSSTransformComponent> declaration with no length attribute or indexed getter.

This means a WebIDL-ECMAScript bindings generator should reject those interfaces (which is something I'm trying to implement in Blink).

The css-typed-om-1 spec should be updated to include those missing attributes and operations, as well as some prose describing what sort of value the getter needs to return.

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