Element.this

this(Document _parentDocument, string _tagName, string[string] _attributes = null, bool _selfClosed = false)

Generally, you don't want to call this yourself - use Element.make or document.createElement instead.

this(string _tagName, string[string] _attributes = null, const string[] selfClosedElements = htmlSelfClosedElements)

Convenience constructor when you don't care about the parentDocument. Note this might break things on the document. Note also that without a parent document, elements are always in strict, case-sensitive mode.

History

On February 8, 2021, the selfClosedElements parameter was added. It defaults to the same behavior as

before: using the hard-coded list of HTML elements, but it can now be overridden. If you use Document.createElement, it will use the list set for the current document. Otherwise, you can pass something here if you like.

this(Document _parentDocument)
No documentation available for this declaration.