ykzts/node-xmlhttprequest — pull request #19 by kapouer (2014-08-03 00:14:11+00:00)
Title: Set cookie request header for same origin window.document.cookie

This is experimental.
getDoc() is there only to respect current 'global' isolation.
It might only work if 'window' is available in the scope where require('w3c-xmlhttprequest') is called,
like https://github.com/kapouer/jsdom/blob/master/lib/jsdom/browser/index.js#L230.