Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

DomUtils.getSiblings

Gets an elements siblings, including the element itself.

Attempts to get the children through the element's parent first. If we don't have a parent (the element is a root node), we walk the element's prev & next to get all remaining nodes.

function getSiblings(elem: Node): Node[];
§
getSiblings(elem: Node): Node[]
[src]

§Parameters

§
elem: Node
[src]

Element to get the siblings of.

§Return Type

§

elem's siblings.