blockly > INavigationPolicy

INavigationPolicy interface

A set of rules that specify where keyboard navigation should proceed.

Signature:

export interface INavigationPolicy<T> 

Methods

Method Description
getFirstChild(current) Returns the first child element of the given element, if any.
getNextSibling(current) Returns the peer element following the given element, if any.
getParent(current) Returns the parent element of the given element, if any.
getPreviousSibling(current) Returns the peer element preceding the given element, if any.
isApplicable(current) Returns whether or not this navigation policy corresponds to the type of the given object.
isNavigable(current)

Returns whether or not the given instance should be reachable via keyboard navigation.

Implementors should generally return true, unless there are circumstances under which this item should be skipped while using keyboard navigation. Common examples might include being disabled, invalid, readonly, or purely a visual decoration. For example, while Fields are navigable, non-editable fields return false, since they cannot be interacted with when focused.