Skip to content

DOMPurifyI.isValidAttribute method

DOMPurifyI › isValidAttribute

Unofficial

Check if an attribute is valid for a given tag.

Signature:

isValidAttribute(tag: string, attr: string, value: string): boolean

Parameters:

Parameter Type Description
tag string The tag name.
attr string The attribute name.
value string The attribute value.

Returns: booleanWhether the attribute is valid.