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

fix: use globalThis instead of global for browser support #928

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface Options {
* This defaults to the owner document of an element if an API is called directly with an element and without setup.
* Otherwise it falls back to the global document.
*
* @default element.ownerDocument??global.document
* @default element.ownerDocument??globalThis.document
*/
document?: Document

Expand Down Expand Up @@ -136,7 +136,7 @@ export const defaultOptionsDirect: Required<Options> = {
applyAccept: true,
autoModify: true,
delay: 0,
document: global.document,
document: globalThis.document,
keyboardMap: defaultKeyboardMap,
pointerMap: defaultPointerMap,
pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,
Expand Down