Tracks which widgets are currently "active".
A widget is considered active if it or a descendant widget has focus, or if a non-focusable node of this widget or a descendant was recently clicked.
Call focus.on("active-widget-stack", callback)
to track the stack of currently focused widgets.
Call focus.on("widget-blur", func)
or focus.on("widget-focus", ...)
to monitor when
when widgets become active/inactive.
Finally, focus.focus(node)
will focus a node, suppressing errors if the node doesn't exist.
Members
-
<static> activeStack
-
List of currently active widgets (focused widget and its ancestors).
- Source:
Properties:
Name Type Description activeStack
Array.<Element>
Methods
-
<static> focus(node)
-
Focus the specified node, suppressing errors if they occur.
Parameters:
Name Type Description node
Element -
<static> registerIframe(iframe) → {Object}
-
Registers listeners on the specified iframe so that any click or focus event on that iframe (or anything in it) is reported as a focus/click event on the
<iframe>
itself.In dijit this was only used by editor; perhaps it should be removed.
Parameters:
Name Type Description iframe
HTMLIframeElement Returns:
Handle with
remove()
method to deregister.- Type
- Object