Re: [whatwg] Fetch API: asHTML

From: annevankesteren@gmail.com <annevankesteren@gmail.com> on behalf of Anne van Kesteren <annevk@annevk.nl>

> However, I could see it instead has to go the other way around. Instead of having a bunch of methods on stream to convert it into various other pieces. Other pieces could have ways of dealing with streams. That might make coding a bit more awkward though.

Right, this would be more pure I suppose. But IMO the usability gain here is worth the layering violations. .NET-style "stream readers" are not very fun to work with in my experience.

It would be good to have a clear mental model guiding the API decisions though. For example, isolating the layering violations into the convenience asXYZ methods.

Received on Monday, 23 June 2014 15:35:41 UTC