Code that previously assumed a global document or window now uses the related
node’s ownerDocument or ownerDocument.defaultView as appropriate.
If no related node is available, the corresponding code will crash; however, the
rest of D3 will work just fine. For example, you can’t use d3.select(string)
unless a global document is available; it just doesn’t make sense. Use
d3.select(node) instead, followed by selection.select(string).
Code that previously checked for a global on the window (e.g., XDomainRequest)
now uses the global context (`this`) rather than the window.