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
Seems reasonable to me. Looks like the right approach from the code side would be to lazily create an instance of Screen when it's first needed, rather than when the property is accessed. PR welcome!
Affects all supported Electron versions and platforms and has been reported and closed before here in 2016.
Expected Behavior
This should not have any side effects:
Actual behavior
However it gives an error:
Error: Cannot require "screen" module before app is ready
As well as the undesired side effects, the error is pretty poor as we're not even requiring the screen module, we're simply accessing the property.
This also means the docs ask developers to do unnecessary complicated things like:
Additional Information
The session API cannot be used before app ready, but can be required without side effects:
The APIs that are unavailable before app ready should at least behave consistently.
The text was updated successfully, but these errors were encountered: