What happens when you call OS-specific methods on an unsupported OS?


#1

In the docs here: http://electron.atom.io/docs/all/#methods

It says:

Note: Some methods are only available on specific operating systems and are labeled as such.

But doesn’t say what happens when those methods are called when not available. Are they no-ops? Or will calling them throw an error?


#2

I’m not sure the behavior is consistent across the board, but in general functions/methods that are not available on a particular platform will be undefined, so if you try to invoke them an exception will be thrown.