Skip to content

Conversation

@jpoppe
Copy link
Contributor

@jpoppe jpoppe commented Jul 10, 2018

See commits for more info.

jpoppe added 2 commits July 3, 2018 23:28
When the node timers are not explicitly set this library can't be used directly with the client side of Electron, when timers method are used explicitly Electron is able to recognize those and make them work on the client side.
@jaller94
Copy link

@jpoppe What is the advantage of the Electron timers over the JavaScript standard?

@jpoppe
Copy link
Contributor Author

jpoppe commented Oct 12, 2018

@jaller94 it is not about 'using electron timers'

This pull requests explicitly imports (requires) the node timers module so setInterval will now be called with timers.setInterval.

This will still be the same node timer (and nothing will change when this library is used with node), but without this require Electron is unable to determine that setInterval comes from node and would try to use the browser's built-in setInterval and would fail since it is incompatible (at least in this context).

@jaller94
Copy link

Thanks. I am not familiar with Electron development and got curious of why a library should adapt for one framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants