used for DOM events
.
.
This is probably not useful to you unless you're writing a browser or something like that. It represents a *computed* style, like what the browser gives you after applying stylesheets, inline styles, and html attributes. From here, you can start to make a layout engine for the box model and have a css aware browser.
The main document interface, including a html parser.
.
This represents almost everything in the DOM.
This is used when you are using one of the require variants of navigation, and no matching element can be found in the tree.
This is the lazy range that walks the tree for you. It tries to go in the lexical order of the source: node, then children from first to last, each recursively.
This is a DOM event, like in javascript. Note that this library never fires events - it is only here for you to use if you want it.
.
.
There are subclasses of Element offering improved helper functions for the element in HTML. .
.
.
.
.
This is kinda private; just a little utility container for use by the ElementStream class.
This probably isn't useful, unless you're writing a browser or something like that. You might want to look at arsd.html for css macro, nesting, etc., or just use standard css as text.
.
Represents anything that can be a table cell - <td> or <th> html.
Represents a table row element - a <tr>
.
Specializes Document for handling generic XML. (always uses strict mode, uses xml mime type and file header)
.
Translates a css style property-name to a camel cased propertyName
finds comments that match the given txt. Case insensitive, strips whitespace.
.
This takes a string of raw HTML and decodes the entities into a nice D utf-8 string. By default, it uses loose mode - it will try to return a useful string from garbage input too. Set the second parameter to true if you'd prefer it to strictly throw exceptions on garbage input.
Given text, encode all html entities on it - &, <, >, and ". This function also encodes all 8 bit characters as entities, thus ensuring the resultant text will work even if your charset isn't set right.
.
.
.
This helper function is used for decoding html entities. It has a hard-coded list of entities and characters.
.
.
.
You can use this to do an easy null check or a dynamic cast+null check on any element.
Converts a camel cased propertyName to a css style dashed property-name
An alias for htmlEntitiesEncode; it works for xml too
This might belong in another module, but it represents a file with a mime type and some data. Document implements this interface with type = text/html (see Document.contentType for more info) and data = document.toString, so you can return Documents anywhere web.d expects FileResources.
this puts in operators and opDispatch to handle string indexes and properties, forwarding to get and set functions.
.
Proxy object for attributes which will replace the main opDispatch eventually
A proxy object to do the Element class' dataset property. See Element.dataset for more info.
A collection of elements which forwards methods to the children.
for style, i want to be able to set it with a string like a plain attribute, but also be able to do properties Javascript style.
The html struct is used to differentiate between regular text nodes and html in certain functions
An option type that propagates null. See: Element.optionSelector
Represents a parsed CSS selector.
.
.
This is an html DOM implementation, started with cloning what the browser offers in Javascript, but going well beyond it in convenience.
If you can do it in Javascript, you can probably do it with this module, and much more.
BTW: this file optionally depends on arsd.characterencodings, to help it correctly read files from the internet. You should be able to get characterencodings.d from the same place you got this file.
If you want it to stand alone, just always use the Document.parseUtf8 function or the constructor that takes a string.