-
Notifications
You must be signed in to change notification settings - Fork 11
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
Does this check if the renderer part is being executed in a regular browser? #3
Comments
Just to be clear, you have one codebase that works in a standard browser and inside electron, right? If so, at the moment I don't think can be useful implement this function because is an edge case. function isStandardBrowser () {
try {
return !!window
} catch (e) {
return false
}
}
// then
if (is.renderer() || isStandardBrowser()) { ... } This should work. |
I added previously the process object through |
FYI: (Or anyone that end up here). I did the is.standardBrowser() and it worked. BUT. This is a big but, like BUT it didn't matter. Thanks you. Maybe you want to warn me, but I did not read well. |
I have not try this, but I'm already using this one is-electron-renderer.
However, this have the issue that does not distinguish between renderer process and a browser process, properly webpacked. See this
I would like to know if this support this kind of distinction.
Thanks! :).
The text was updated successfully, but these errors were encountered: