Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.13 KB

TargetInCollective.md

File metadata and controls

28 lines (22 loc) · 1.13 KB

API Documentation

TargetInCollective

Mixin which allows a component to provide aggregate behavior with other elements, e.g., for keyboard handling.

This mixin implicitly creates a collective for a component so that it can participate in collective keyboard handling. See the Collective class for details.

You can use this mixin in conjunction with ContentFirstChildTarget to automatically have the component's collective extended to its first child.

Kind: global class

targetInCollective.target : HTMLElement

Gets/sets the current target of the component.

Set this to point to another element. That target element will be implicitly added to the component's collective. That is, the component and its target will share responsibility for handling keyboard events.

You can set this property yourself, or you can use the ContentFirstChildTarget mixin to automatically set the target to the component's first child.

Kind: instance property of TargetInCollective