Electron Node.js Test

This doctest is expected to work only within the IWMBrowser. IWMBrowser windows are opened with a preload.js which is evaluated before the HTML is loaded. According to "I can not use jQuery/RequireJS/Meteor/AngularJS in Electron" we have to rename the symbols in the page before other libraries are included. In order to access node.js modules we can use `nodeRequire` instead.

As a simple test we try to load a file from the filesystem:

As simple as this test is, it shows that within the IWMBrowser one import all node.js modules. Don't forget to test for nodeRequire to avoid runtime errors in other browsers.

References