read_file fix
This commit is contained in:
parent
b7b922815b
commit
5afa537069
1 changed files with 1 additions and 1 deletions
|
|
@ -440,7 +440,7 @@ if( typeof AFRAME != 'undefined '){
|
||||||
this.el.addEventListener('read_file', async (e) => {
|
this.el.addEventListener('read_file', async (e) => {
|
||||||
const buf = await this.term.worker.read_file( e.detail[0] )
|
const buf = await this.term.worker.read_file( e.detail[0] )
|
||||||
const str = new TextDecoder().decode(buf)
|
const str = new TextDecoder().decode(buf)
|
||||||
if( typeof e.detail[1] == 'function' ) e.detail[1](str)
|
if( typeof e.detail[1] == 'function' ) e.detail[1](str,buf)
|
||||||
else console.log(str)
|
else console.log(str)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue