vanillajs-browser-helpers
Version:
Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser
41 lines (40 loc) • 951 B
TypeScript
/**
* Get all sibling elements before a given DOM element in the structure
*
* @param elm - DOM element to find siblings of
* @return Collection of sibling elements
*
* @example
*
* ```ts
* previousSiblings(someElement);
* ```
*/
export declare const previousSiblings: (elm: Node | null) => Element[];
/**
* Get all sibling elements after a given DOM element in the structure
*
* @param elm - DOM element to find siblings of
* @return Collection of sibling elements
*
* @example
*
* ```ts
* nextSiblings(someElement);
* ```
*/
export declare const nextSiblings: (elm: Node | null) => Element[];
declare const _default: (elm: Node | null) => Element[];
/**
* Get all sibling elements of a given DOM element
*
* @param elm - DOM element to find siblings of
* @return Collection of sibling elements
*
* @example
*
* ```ts
* siblings(someElement);
* ```
*/
export default _default;