lost+found/src/html.js
function (event) {
                var
                    reader = event.target,
                    buffer,
                    len,
                    result,
                    idx;
                _gpfAssert(reader === this._reader, "Unexpected change of reader");
                if (reader.error) {
                    gpfFireEvent.call(this,
                        gpfI.IReadableStream.ERROR,
                        {
                            // According to W3C
                            // http://www.w3.org/TR/domcore/#interface-domerror
                            error: {
                                name: reader.error.name,
                                message: reader.error.message
                            }
                        },
                        this._eventsHandler
                    );
                } else if (reader.readyState === FileReader.DONE) {
                    buffer = new Int8Array(reader.result);
                    len = buffer.length;
                    result = [];
                    for (idx = 0; idx < len; ++idx) {
                        result.push(buffer[idx]);
                    }
                    gpfFireEvent.call(this, gpfI.IReadableStream.EVENT_DATA, {buffer: result}, this._eventsHandler);
                }
            }
function (event) {
                var
                    reader = event.target,
                    buffer,
                    len,
                    result,
                    idx;
                _gpfAssert(reader === this._reader, "Unexpected change of reader");
                if (reader.error) {
                    gpfFireEvent.call(this,
                        gpfI.IReadableStream.ERROR,
                        {
                            // According to W3C
                            // http://www.w3.org/TR/domcore/#interface-domerror
                            error: {
                                name: reader.error.name,
                                message: reader.error.message
                            }
                        },
                        this._eventsHandler
                    );
                } else if (reader.readyState === FileReader.DONE) {
                    buffer = new Int8Array(reader.result);
                    len = buffer.length;
                    result = [];
                    for (idx = 0; idx < len; ++idx) {
                        result.push(buffer[idx]);
                    }
                    gpfFireEvent.call(this, gpfI.IReadableStream.EVENT_DATA, {buffer: result}, this._eventsHandler);
                }
            }
function ( event ) { var reader = event . target , buffer , len , result , idx ; _gpfAssert ( reader === this . _reader , "Unexpected change of reader" ) ; if ( reader . error ) { gpfFireEvent . call ( this , gpfI . IReadableStream . ERROR , { // According to W3C // http://www.w3.org/TR/domcore/#interface-domerror error : { name : reader . error . name , message : reader . error . message } } , this . _eventsHandler ) ; } else if ( reader . readyState === FileReader . DONE ) { buffer = new Int8Array ( reader . result ) ; len = buffer . length ; result = [ ] ; for ( idx = 0 ; idx < len ; ++ idx ) { result . push ( buffer [ idx ] ) ; } gpfFireEvent . call ( this , gpfI . IReadableStream . EVENT_DATA , { buffer : result } , this . _eventsHandler ) ; } }
Wrapper for the onloadend event handler

@param {DOM Event} event
@private
Wrapper for the onloadend event handler