---
title: Window.blur()
slug: Web/API/Window/blur
tags:
  - API
  - DOM
  - Gecko
  - Method
browser-compat: api.Window.blur
---
{{APIRef}}

Shifts focus away from the window.

## Syntax

```js
window.blur()
```

## Example

```js
window.blur();
```

## Notes

The window\.blur() method is the programmatic equivalent of the user shifting focus away
from the current window.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
