Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listen method doesn't work inside a web worker #17

Open
W4G1 opened this issue Apr 4, 2020 · 0 comments
Open

listen method doesn't work inside a web worker #17

W4G1 opened this issue Apr 4, 2020 · 0 comments

Comments

@W4G1
Copy link

W4G1 commented Apr 4, 2020

Try to run this snipped inside a web worker:

let obj = icaro({})

obj.listen(function () {
  console.log('Something changed!')
})

obj.foo = 'bar'

It will result in this error and the listener function never gets triggered:

TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': No function was found that matched the signature provided.
    at registerImmediate (set-immediate.js?f31a:66)
    at setImmediate (set-immediate.js?f31a:15)
    at Object.eval (index.js?74c6:112)
    at Object.set (index.js?74c6:75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant