type
fields
title |
The title of this document. |
---|
methods
activeElem |
Get the currently focused element, or |
---|---|
addCookie |
Add a cookie to this session. |
body |
Get the body element. |
cookies |
Map of cookie values keyed by cookie name. |
createElem |
Create a new element with the given tag name. |
elemById |
Get the element with this |
elemFromPos |
Get the topmost element at the specified coordinates (relative to the viewport), or |
elemsFromPos |
Get a list of all elements at the specified coordinates (relative to the viewport). |
exec |
When a HTML document has been switched to |
head |
Get the head element. |
onEvent |
Attach an event handler for the given event on this document. |
out |
Return a WebOutStream for writing content into this document. |
querySelector |
Returns the first element within the document (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors, or null if none found. |
querySelectorAll |
Returns a list of the elements within the document (using depth-first pre-order traversal of the document's nodes) that match the specified group of selectors. |
removeEvent |
Remove the given event handler from this document. |
Slot Details
activeElem
addCookie
body
cookies
createElem
elemById
elemFromPos
elemsFromPos
exec
src
Bool exec(Str name, Bool defUi := false, Obj? val := null)
When a HTML document has been switched to designMode
, the document object exposes the exec
method which allows one to run commands to manipulate the contents of the editable region.
name
: the command name to executedefUi
: flag to indicate if default user interface is shownval
: optional value for commands that take an argument
head
onEvent
out
src
WebOutStream out()
Return a WebOutStream for writing content into this document. You should call close
on the stream when done writing to notify browser load is complete.