Re: [whatwg] Fetch API: asHTML

From: Adam Barth <w3c@adambarth.com>

> It might be instructive to think about how the Node community would structure these APIs.  Node has a much stronger notion of modules and dependencies than browsers because Node uses npm.  As Node developer, I would be sad if my networking module dragged in an entire HTML implementation.

This is a great point. From this perspective, JSON is fine since it's part of the JS language. Encoding is a bit on the edge; it's a judgement call based on whether your "networking module" wants to recognize the fact that networks often transport text, or whether it should stay purely on the bytes level. The convenience argument pushes me toward saying encoding is OK, especially since that's a unidirectional dependency. But HTML is definitely out.

Received on Monday, 23 June 2014 15:47:19 UTC