111
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
432 B

2 years ago
const utils = require('./utils')
console.log('hello worker')
worker.postMessage({
msg: 'hello from worker: ' + utils.test(),
buffer: utils.str2ab('hello arrayBuffer from worker')
})
worker.onMessage((msg) => {
console.log('[Worker] on appservice message', msg)
const buffer = msg.buffer
console.log('[Worker] on appservice buffer length ', buffer)
console.log('[Worker] on appservice buffer', utils.ab2str(buffer))
})