Helper functions for passing document/window context into node-webkit

npm install nw-context
1 downloads in the last week
6 downloads in the last month


Store browser document and window objects in a module for later retrieval from node-webkit modules running in the node context.

Set up in the browser:

var context = require('nw-context');
    window: window,
    document: document

Then from within other modules:

var window = require('nw-context').window,
    document = require('nw-context').document;
npm loves you