Struct Document
The HTML5 Document
struct Document
;
Constructors
Name | Description |
---|---|
this
(html)
|
Build a document from source |
Properties
Name | Type | Description |
---|---|---|
body [get]
|
Element | The <body> element
|
head [get]
|
Element | The <head> element
|
isValid [get]
|
bool | Is this a valid html5 document? |
title [get]
|
string | The content of <title> tag
|
title [set]
|
const(string) | Set the content of <title> tag
|
Methods
Name | Description |
---|---|
byClass
(name)
|
A lazy range of elements filtered by class |
byComment
(comment)
|
A lazy range of elements identified by an adjacent comment |
byId
(id)
|
Get an element by id |
bySelector
(selector)
|
A lazy range of elements filtered using a css selector |
byTagName
(name)
|
A lazy range of elements filtered by tag name |
createComment
(text)
|
Create a comment |
createElement
(tagName)
|
Create a html element |
createText
(text)
|
Create a text element |
fragment
(html)
|
Create a document fragment from source |
opCast
()
|
You can cast a document to a string |
toString
()
|
Return document as html string |