nl_tokens: Load sequence
pl_tokens: function loadSequence ( index , files ) { return ( Promise . resolve ( ) // load the file . then ( function ( ) { return new Promise ( function ( resolve , reject ) { let myReader = new FileReader ( ) ; // should handle errors too... myReader . addEventListener ( 'load' , function ( e ) { resolve ( e . target . result ) ; } ) ; myReader . readAsArrayBuffer ( <mask> [ index ] ) ; } ) ; } ) . then ( function ( buffer ) { return loader . parse ( { url : files [ index ] . name , buffer } ) ; } ) . then ( function ( series ) { seriesContainer . push ( series ) ; } ) . catch ( function ( error ) { window . console . log ( 'oops... something went wrong...' ) ; window . console . log ( error ) ; } ) ) ; }