Re: [whatwg/streams] "Let controller be this." (#552)

I introduced this step to use the controller instance in the fulfillment callback when implementing this in the reference implementation without thinking deeply. And then, ported it to the spec text.

Let me think about it again more seriously. For the reference implementation, if the arrow function is used inside the WritableStreamDefaultController method, we can bind `this` to be used in the fulfillment/rejection handler to the controller. Or, we could use .bind() to do the same thing.

For the spec text, I think the current form is good in terms of clarification than assuming that even in the created callbacks `this` is referring to the same this.

-- 
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/552#issuecomment-255382929

Received on Friday, 21 October 2016 13:53:59 UTC