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

x/html_parser/src/mod.ts>DomUtils.prevElementSibling

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

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.