w3c/css-houdini-drafts

[css-typed-om] StylePropertyMapReadOnly.get return type should be nullable

j-f1 opened this issue · 0 comments

j-f1 commented

Spec section: https://drafts.css-houdini.org/css-typed-om/#the-stylepropertymap

Current implementation:

interface StylePropertyMapReadOnly {
  (undefined or CSSStyleValue) get(USVString property);
}

I think this should be:

interface StylePropertyMapReadOnly {
  CSSStyleValue? get(USVString property);
}

I don’t think there are any other specs that use the (undefined or X) union style to express an optional return value, but there are plenty of specs that use X?, e.g. DataTransferItem.getAsFile()