HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

hasFocus

Description

The hasFocus of Document for JS returns true if key events are being routed through or to the document; otherwise, returns false. Roughly speaking, this corresponds to the document, or a document nested inside this one, being focused.

Syntax

document.hasFocus()

Examples

1 · false

2 · true