Created
June 24, 2017 19:43
-
-
Save tomlagier/0ea09b600ec912e0e147c36d36b93854 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fr = new FileReader(); | |
fr.readAsArrayBuffer(file); | |
fr.onloadend = heap => this.worker.postMessage({ | |
command: 'TransferProfile', | |
data: { | |
heap | |
} | |
}, [heap]); //Passing [heap] as a 2nd parameter flags it as Transferable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment