Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 957 Bytes

global.rst

File metadata and controls

43 lines (28 loc) · 957 Bytes

dojo.global

Status

Draft

Version

1.0

Project owner

?--

since

V0.9

dojo.global is an alias for the global scope.

Introduction

In a browser environment, dojo.global is the window object. You should refer to dojo.global rather than window so that your code will run correctly in other contexts (e.g. Rhino on a server).

Usage

Though this example is clearly targeted at a browser environment, by using dojo.global over the window object we are ensuring the code will run in any other environments with a defined host environment file (hostenv_something).

See also

  • dojo.withGlobal <dojo/withGlobal>
  • dojo.doc <dojo/doc>