skippy-links
Version:
A small and easy to use web component to provide dynamic skip links to any page
30 lines (29 loc) • 895 B
TypeScript
import { Target } from './types.js';
export declare class SkippyLinks extends HTMLElement {
private _targets;
private _shadow;
private readonly _skippyLinksLabelAttributeName;
private readonly _emptyAttribute;
constructor();
connectedCallback(): void;
_init(): void;
/**
* Create a new Target object with all relevant properties
*
* @param {HTMLElement} possibleTarget
* @param {string} targetId
* @param {string} targetLabel
* @returns {Target} Target
*/
_createNewTarget(possibleTarget: HTMLElement, targetId: string, targetLabel: string): Target;
/**
* Populate the component with links to the page's targets
*/
_populate(): void;
/**
* handle focus when one of the links is clicked
*
* @param {HTMLElement} targetElement
*/
_handleClick(targetElement: HTMLElement): void;
}