Skip to content

Commit

Permalink
Allow parsing a file from window.postMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Sep 24, 2023
1 parent 97c567f commit 5fcb435
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/SideBarFileManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ export default {
}
},
mounted () {
window.addEventListener('message', (event) => {
if (event.data.type === 'arrayBuffer') {
worker.postMessage({
action: 'parse',
file: event.data.data,
isTlog: false
})
}
})
worker.onmessage = (event) => {
if (event.data.percentage) {
this.state.processPercentage = event.data.percentage
Expand Down

0 comments on commit 5fcb435

Please sign in to comment.