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

Use in contexts without access to window #51

Open
mlduff opened this issue Feb 9, 2025 · 1 comment
Open

Use in contexts without access to window #51

mlduff opened this issue Feb 9, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request javascript Pull requests that update Javascript code

Comments

@mlduff
Copy link

mlduff commented Feb 9, 2025

I'm trying to use this package to support a Chrome extension I am writing - the only issue in the use of window (which is undefined in the Chrome extension context) - is it possible to remove the dependency of this package on being able to access window?

@The-Best-Codes The-Best-Codes self-assigned this Feb 9, 2025
@The-Best-Codes The-Best-Codes added enhancement New feature or request javascript Pull requests that update Javascript code labels Feb 9, 2025
@The-Best-Codes
Copy link
Owner

Hi @mlduff, thanks for the feedback!
Does your extension have a build step (e.g., Rollup or similar) or are you downloading best-bible and using it directly?

If you have a build step, you should be able to use the package just like any other ESM package, without any reliance on window. The browser specific version is for webpages without a build step.

However, I am working on a chrome variant of the library for use in extensions (more easily) and will let you know when I finish it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

2 participants