[whatwg/streams] Specifying QueuingStrategies in WebIDL (#1005)

As part of #963, we will have to specify CountQueuingStrategy and ByteLengthQueuingStrategy in WebIDL. There are a couple of things about these classes that are "strange" from a WebIDL point-of-view:

1. size() is a function (as opposed to a method), but it is inherited
2. `highWaterMark` is added by the constructor as a property of the object, rather than coming from the prototype.

I think problem 2. can be fixed quite easily by making `highWaterMark` a normal interface attribute.

Problem 1. is harder. WebIDL doesn't seem to have functions as such at all. The closest thing is "[Callback functions](https://heycam.github.io/webidl/#idl-callback-functions)", but it doesn't appear that they can exist as attributes on an interface. There are also "static operations", which are a bit like functions, but appear as properties of the constructor, not the prototype.

-- 
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/1005

Received on Tuesday, 9 July 2019 04:17:11 UTC