feross / queue-microtask

fast, tiny `queueMicrotask` shim for modern engines

Home Page:https://feross.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Illegal invocation in Chrome

yunyu opened this issue · comments

When using this library in Chrome with a bundler, I get an Uncaught TypeError: Illegal invocation when running it. You can replicate this without the library by assigning queueMicrotask to a field in an object in the Chrome console:

image

queueMicrotask should be bound to window if present. This is not an issue in Node.