DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
    • can-construct-super
    • can-define-stream
    • can-fixture
    • can-fixture-socket
    • can-jquery
    • can-stache-converters
    • can-stream
    • can-vdom
      • types
        • window
      • modules
        • ./make-document/
        • ./make-window/
    • can-view-import
    • can-zone
    • steal-stache
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Ecosystem
  • /
  • can-vdom
  • /
  • ./make-window/
  • / On this page
    • ./make-window/make-window

      module

      Exports a function that window called, returns an object that looks like a window.

      • source

      makeWindow()

      Creates a document and places it, along with other common browser globals, on a new object and then returns that object.

      var makeWindow = require("can-vdom/make-window/make-window");
      makeWindow();
      
      window.document.body //-> Node
      

      Returns

      {window}:

      An object with common browser globals.

      makeWindow(global)

      Creates a document and places it, along with other common browser globals, on the global object.

      var makeWindow = require("can-vdom/make-window/make-window");
      
      var window = makeWindow({});
      

      Parameters

      1. global {window}:

        An object that represents the environment's global.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.