[heycam/webidl] Normative: Add `null` type, and allow it as a return type (excl. unions) (#950)

This complements <https://github.com/heycam/webidl/pull/906> and makes it possible to specify the legacy `PluginArray` and `MediaTypeArray` APIs without using a nullable `object?` type: <https://github.com/whatwg/html/pull/6296#discussion_r559340322>


```diff webidl
 [Exposed=Window]
 interface PluginArray {
  undefined refresh();
  readonly attribute unsigned long length;
- object? item(unsigned long index);
- object? namedItem(DOMString name);
+ null item(unsigned long index);
+ null namedItem(DOMString name);
 };
 
 [Exposed=Window]
 interface MimeTypeArray {
  readonly attribute unsigned long length;
- object? item(unsigned long index);
- object? namedItem(DOMString name);
+ null item(unsigned long index);
+ null namedItem(DOMString name);
 };
```
You can view, comment on, or merge this pull request online at:

  https://github.com/heycam/webidl/pull/950


-- Commit Summary --

  * Normative: Add `null` type, and allow it as a return type (excl. unions)

-- File Changes --

    M index.bs (29)

-- Patch Links --

https://github.com/heycam/webidl/pull/950.patch

https://github.com/heycam/webidl/pull/950.diff


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/950

Received on Friday, 22 January 2021 07:56:17 UTC