4.1.1 • Published 12 years ago
domthen v4.1.1
domthen
Promises for silly DOMRequest crap. Inspired by how fucking awful the DOM callback convention is.
Installation
$ npm install domthenor
$ component install nathan7/domthenAPI
domthen(obj)
Returns a promise, resolved with obj.result when obj.onsucces is called, rejected with obj.error when obj.onerror is called.
domthen.proto(constructor)
Adds .done and .then to the given constructor's prototype.
For example, domthen.proto(DOMRequest).
License
MIT