Skip to content

getAttr

Reads an attribute, like getAttribute.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function getAttr(this: Element, qualifiedName: string): string | null

Parameters:

Parameter Type Description
this Element
qualifiedName string The attribute name.

Returns: string | null — The attribute’s value, or null when it is absent.