Class HTMLDetailsElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The HTMLDetailsElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating {{HTMLElement("details")}} elements.
[Value("HTMLDetailsElement")]
public class HTMLDetailsElement : HTMLElement
- Inheritance
-
HTMLDetailsElement
- Inherited Members
Remarks
-The HTML element implementing this interface: details
Constructors
HTMLDetailsElement()
public HTMLDetailsElement()
Properties
Name
The name property of the HTMLDetailsElement interface reflects the name attribute of details elements. It enables multiple <details> elements to be connected together, where only one for the <details> elements can be open at once. This allows developers to easily create UI features such as accordions without scripting.
[Value("name")]
public string Name { get; set; }
Property Value
- string
A string. The empty string if the element is not part of any group.
Remarks
The name attribute specifies a group name — give multiple <details> elements the same name value to group them. Only one of the grouped <details> elements can be open at a time — opening one will cause another to close. If multiple grouped <details> elements are given the open attribute, only the first one in the source order will be rendered open.
Open
The open property of the
HTMLDetailsElement interface is a boolean value reflecting theopen HTML attribute, indicating whether the details's contents (not counting the summary) is to be shown to the user.
[Value("open")]
public bool Open { get; set; }
Property Value
- bool
A boolean value.The boolean value represents the state of the
openHTML attribute. The value oftruemeans it is set with both the summary and the additional information shown to the user. Thefalsevalue means it not set, with only the summary shown.