Skip to main content

Class: CommentBarButtonNavigationPolicy

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:14

Set of rules controlling keyboard navigation from a CommentBarButton.

Implements

Methods index

MethodDescription
getFirstChildReturns the first child of the given CommentBarButton.
getParentReturns the parent of the given CommentBarButton.
getNextSiblingReturns the next peer node of the given CommentBarButton.
getPreviousSiblingReturns the previous peer node of the given CommentBarButton.
getRowIdReturns the row ID of the given CommentBarButton.
isNavigableReturns whether or not the given CommentBarButton can be navigated to.
isApplicableReturns whether the given object can be navigated from by this policy.

Constructors

Constructor

new CommentBarButtonNavigationPolicy(): CommentBarButtonNavigationPolicy;

Returns

CommentBarButtonNavigationPolicy

Methods

getFirstChild()

getFirstChild(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:21

Returns the first child of the given CommentBarButton.

Parameters

ParameterTypeDescription
_currentCommentBarButtonThe CommentBarButton to return the first child of.

Returns

IFocusableNode | null

Null.

Implementation of

INavigationPolicy.getFirstChild


getParent()

getParent(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:31

Returns the parent of the given CommentBarButton.

Parameters

ParameterTypeDescription
currentCommentBarButtonThe CommentBarButton to return the parent of.

Returns

IFocusableNode | null

The parent comment of the given CommentBarButton.

Implementation of

INavigationPolicy.getParent


getNextSibling()

getNextSibling(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:43

Returns the next peer node of the given CommentBarButton.

Parameters

ParameterTypeDescription
currentCommentBarButtonThe CommentBarButton to find the following element of.

Returns

IFocusableNode | null

The next CommentBarButton, if any.

Implementation of

INavigationPolicy.getNextSibling


getPreviousSibling()

getPreviousSibling(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:58

Returns the previous peer node of the given CommentBarButton.

Parameters

ParameterTypeDescription
currentCommentBarButtonThe CommentBarButton to find the preceding element of.

Returns

IFocusableNode | null

The CommentBarButton's previous CommentBarButton, if any.

Implementation of

INavigationPolicy.getPreviousSibling


getRowId()

getRowId(current): string;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:73

Returns the row ID of the given CommentBarButton.

Parameters

ParameterTypeDescription
currentCommentBarButtonThe CommentBarButton to retrieve the row ID of.

Returns

string

The row ID of the given CommentBarButton.

Implementation of

INavigationPolicy.getRowId


isNavigable()

isNavigable(current): boolean;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:83

Returns whether or not the given CommentBarButton can be navigated to.

Parameters

ParameterTypeDescription
currentCommentBarButtonThe instance to check for navigability.

Returns

boolean

True if the given CommentBarButton can be focused.

Implementation of

INavigationPolicy.isNavigable


isApplicable()

isApplicable(current): current is CommentBarButton;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_bar_button_navigation_policy.ts:93

Returns whether the given object can be navigated from by this policy.

Parameters

ParameterTypeDescription
currentanyThe object to check if this policy applies to.

Returns

current is CommentBarButton

True if the object is an CommentBarButton.

Implementation of

INavigationPolicy.isApplicable