mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
564 stars 64 forks source link

define the 'global' object #17

Closed mykmelez closed 8 years ago

mykmelez commented 8 years ago

Define the global object, which is available to Node modules both via the global global and also implicitly, as the prototype of the module-specific global object.

There's scant documentation on this object in the Node docs themselves:

https://nodejs.org/api/globals.html#globals_global

And descriptions elsewhere are out-of-date:

http://www.hacksparrow.com/global-variables-in-node-js.html

But this implementation emulates the behavior that I see in a local copy of Node, and it appears to satisfy Electron's dependency on the object. At least it satisfies Electron's assumption that the object exists. It doesn't yet define all the properties that Electron expects to be defined on the object.

This depends on #2, so it contains all the changes on that branch. To see just the changes that were made on this branch, view the comparison between this branch and that one:

https://github.com/mykmelez/positron/compare/renderer-process-modules...global-object

mykmelez commented 8 years ago

This depends on #2, so it contains all the changes on that branch.

Rebased now that #2 has merged.