Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/html_parser/src/utils/traversal.ts>prevElementSibling

Port of fb55/htmlparser2 for Deno
Latest
function prevElementSibling
import { prevElementSibling } from "https://deno.land/x/html_parser@v0.1.3/src/utils/traversal.ts";

Returns the previous element sibling of a node.

Parameters

elem: Node

The element to get the previous sibling of.

Returns

Element | null

elem's previous sibling that is a tag.