- From: Mattias Buelens <notifications@github.com>
- Date: Tue, 09 Jul 2019 09:40:30 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 9 July 2019 16:40:52 UTC
Would this mean that `CountQueuingStrategy.prototype.size()` must always be called with a proper `CountQueuingStrategy` object as `this` context? Correct me if I'm wrong, but it seems like [the WebIDL spec requires a brand check on all operations](https://heycam.github.io/webidl/#dfn-create-operation-function): > 2. If target is an interface, and op is not a static operation: > 2.1. Let esValue be the this value, if it is not null or undefined, or realm’s global object otherwise. (This will subsequently cause a TypeError in a few steps, if the global object does not implement target and [LenientThis] is not specified.) > 2.2. If esValue is a platform object, then perform a security check, passing esValue, id, and "method". > 2.3. **If esValue does not implement the interface target, throw a TypeError.** This would be a problem in the current streams specification, since we always call the size algorithm as a plain function with no `this` context. -- 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#issuecomment-509717329
Received on Tuesday, 9 July 2019 16:40:52 UTC