Re: [whatwg/streams] Switching to Web IDL (#963)

@tschneidereit The wpt tests will start using [idlharness.js](https://github.com/web-platform-tests/wpt/blob/master/resources/idlharness.js) which is even more pedantic than our existing tests and will quickly identify what you need to change to pass.

We've started moving some of Chrome's implementation to WebIDL, so I know some of things that will change.

- The length of argument lists. Currently many arguments are implicitly optional. `readable.cancel()` means the same as `readable.cancel(undefined)`. In IDL they have to become explicitly optional, which means that `ReadableStream.prototype.cancel.length` will change from `1` to `0`.
- ReadableStream will stringify as `"[object ReadableStream]"` instead of `"[object Object]"`.

Some things we should change to make it natural as an IDL spec:
- Methods, etc. will become enumerable.
- Property lookups on option bags will become alphabetised, and conversions will be done as specified in the WebIDL spec. For example, instead of the strategy properties being looked up in the order `"size"`, `"highWaterMark"`, they will be looked up in lexicographical order: `"highWaterMark"`, `"size"`. This will probably be the most annoying change for non-WebIDL implementors, but we will have tests for it which will tell you what the order should be.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/963#issuecomment-440287828

Received on Tuesday, 20 November 2018 14:16:17 UTC