# utils/dom/global

module

<a id="constants">

## Constants

<a id="constant-global">

### `global: GlobalType`

A helper (module) giving an access to the global DOM objects such as `window` and `document`. Accessing these objects using this helper allows easy and bulletproof testing, i.e. stubbing native properties:

```typescript
import { global } from 'ckeditor5';

// This stub will work for any code using global module.
vi.spyOn( global, 'window', 'get' ).mockReturnValue( {
	innerWidth: 10000
} );

console.log( global.window.innerWidth );
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/dom/global.ts#L35)

<a id="interfaces">

## Interfaces

<a id="interface-GlobalType">

### `GlobalType`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
