HTMLDirectoryElement

The interface for <dir>. Extends HTMLElementElement.

Deprecated. HTMLDirectoryElement covers an obsolete element (WHATWG HTML §16.3 "Other elements, attributes and APIs"); it exists only for instanceof / constructor.name fidelity and content-attribute reflection, not for use in new content.

Reflected properties

All setters are guarded and throw NoModificationAllowedError on a read-only document.

Property Attribute Type Notes
compact compact boolean (presence) Reading reflects whether the attribute is present; writing false removes it, any other value sets it present.

See also