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

x/html_parser/src/utils/legacy.ts>getElementsByTagName

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

Parameters

tagName: string | ((name: string) => boolean)

Tag name to search for.

nodes: Node | Node[]

Nodes to search through.

optional
recurse = [UNSUPPORTED]

Also consider child nodes.

optional
limit = [UNSUPPORTED]

Maximum number of nodes to return.

Returns

All nodes with the supplied tagName.