You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because after processed by webpack, 'this' that passed to the factory function won't point to the global window, but an empty object {}, which makes window.document is undefined.
So when executing this line: 'onfocusin' in document, this error throws: Uncaught TypeError: Cannot use 'in' operator to search for 'onfocusin' in undefined.
Just change this to window can fix this (In NodeJS, this module won't work anyway, so it doesn't matter to pass window directly)
The text was updated successfully, but these errors were encountered:
Because after processed by webpack, 'this' that passed to the factory function won't point to the global window, but an empty object {}, which makes
window.document
is undefined.So when executing this line:
'onfocusin' in document
, this error throws:Uncaught TypeError: Cannot use 'in' operator to search for 'onfocusin' in undefined
.Just change
this
towindow
can fix this (In NodeJS, this module won't work anyway, so it doesn't matter to passwindow
directly)The text was updated successfully, but these errors were encountered: