We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Do you know whether this library can work with server-side rendering?
The text was updated successfully, but these errors were encountered:
As I know it should work without document and other browser-specific API. It will just think that the page is always visible.
document
If you will have any problems, please report. I will try to fix it quickly.
Sorry, something went wrong.
hi . @elliotlings i use it in SSR in after js , you can check server side rendering and then use dynamic import
isServer() { return !(typeof window != "undefined" && window.document); } async chatBrowserNotif(title = "", options, onClick) { if (!isServer()) { //use dynamic import because this package cant run in server side const Visibility = await import("visibilityjs"); if ("hidden" == Visibility.state()) { const notification = new Notification(title, { ...options, }); notification.onclick = (e) => { onClick(); }; } } }
No branches or pull requests
Do you know whether this library can work with server-side rendering?
The text was updated successfully, but these errors were encountered: