Web/API/HTMLDetailsElement

From Get docs


The HTMLDetailsElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <details> elements.

Properties

Inherits properties from its parent, HTMLElement.

HTMLDetailsElement.open
Is a boolean reflecting the open HTML attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user.

Methods

No specific method; inherits methods from its parent, HTMLElement.

Events

Listen to this event using addEventListener() or by assigning an event listener to the oneventname property of this interface.

toggle
Fired when the open/closed state of a <details> element is toggled.

Specifications

Specification Status Comment
HTML Living StandardThe definition of 'HTMLDetailsElement' in that specification. Candidate Recommendation  

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
HTMLDetailsElement Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

open Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

toggle event Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
No support  
No support


See also

  • The HTML element implementing this interface: <details>