mozilla-comm / jsmime

A MIME parser written in JavaScript
MIT License
42 stars 18 forks source link

Rebuild on top of the WHATWG Streams API #14

Open jcranmer opened 9 years ago

jcranmer commented 9 years ago

https://streams.spec.whatwg.org/

Unfortunately, the API is still not stable, nor is it actually implemented anywhere in the browser. This will constitute a major, breaking API deviation, but until the specification looks stable, I'll continue using the deliverData/deliverEOF combos I've been using.

(For bonus points: work out how to represent the handler of MimeParser with the streams API).

lygstate commented 9 years ago

What's the advantage of Streams API

jcranmer commented 9 years ago

The Streams API is what will (hopefully) come out naturally for things like file or socket I/O, and there are aspirations for being able to pass streams across worker boundaries.