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

x/html_parser/src/utils/mod.ts>hasAttrib

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

Checks whether an element has an attribute.

Parameters

elem: Element

Element to check.

name: string

Attribute name to look for.

Returns

boolean

Returns whether elem has the attribute name.