w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts

Home Page:https://drafts.css-houdini.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

j-f1 opened this issue · comments

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()