Skip to content

[css-typed-om] [css-paint-api] What happens to unsupported property names in the registered paint styleMap? #523

Closed
@darrnshn

Description

@darrnshn

Suppose we specify unsupported property names calling registerPaint:

registerPaint('bleh', class {
    static get inputProperties() {
        return [
            'invalid', // invalid CSS property
            'border', // shorthand
        ];
    }
    paint(ctx, geom, styleMap) {
        const properties = styleMap.getProperties().sort();
        console.log(properties); // ??
   }
});

The paint spec says it's legal to have invalid properties in inputProperties() for forwards compat, but do these properties actually get returned by the style property map? Would the above output [] or ['invalid', 'border']? Note that normally (using just the Typed OM API), a StylePropertyMap can't contain unsupported property names.

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