Closed Thomas101 closed 8 years ago
Hi, this is intentional. When I put the BrowserWindow in first revision I was starting to work with Electron, and I thought that specifying a dependencies argument will avoid to get a dependency on Electron. But then I realize that since it can only run on Electron platform, the BrowserWindow module is available anyway.
Then, I remove the argument, and wrote the hack you mention to keep compatibility with previous release.
Do you know of other reasons to keep the BrowserWindow argument?
I can't think of any. If you're only supporting electron then I don't see any reason why you can't require it directly. It might be worth adding electron to your npm peerDependencies though -- but that's only for completeness sake really.
Ok, thank you. I leave this issue open to clarify the hack to others, just in case...
API refactored in version 2.0.0
Hey just been trying out your library and you've saved me a ton of time, thanks!
Found a bug though. If you use the example provided in the docs, the browser window params never make it down to the browser...
...ends up in the
__unused_BrowserWindow
variable field on line 71. If you pass the following arguments...the right things end up in the right place. The example does have
show
set tofalse
as well which means at first glance nothing seems to happen.Thanks!