package cascade

Build not yet checked
  1. Overview
  2. Docs
CSS generation and manipulation library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.3.0.tbz
sha256=6240100b1bc62f7e33f820fa3d7f23155f36f9c77d17a49de9e3559141414a08
sha512=3f9a8f7cabf16a09f063e5f807d74f0f9fac8ca1eda01b1873e67ac8289a37837341ae2db1a163ac7965a8360f1601dacdc3fba2d718857caef064827913b1e4

doc/cascade.html/Cascade_html/Html_node/index.html

Module Cascade_html.Html_nodeSource

An Html element as a Cascade.Resolve.NODE, so the library can match selectors and resolve the cascade against a parsed page.

include Cascade.Resolve.NODE with type t = Html.element
Sourceval equal : t -> t -> bool

Node identity, used to locate a node among its siblings.

Sourceval name : t -> string option

The element name (e.g. "div"), or None for an anonymous node. A name is read ASCII case-insensitively, against a type selector and between two siblings alike, so an anonymous node is of the same type as another anonymous node and of no named one.

Sourceval id : t -> string option

The id attribute, or None.

Sourceval classes : t -> string list

The class names from the class attribute.

Sourceval attribute : t -> string -> string option

attribute t name is the value of attribute name, or None.

Sourceval parent : t -> t option

The parent element, or None at the root.

Sourceval children : t -> t list

The child elements, in document order.

Sourceval text_children : t -> string list

The data of the node's direct child text nodes, in document order, and [] for an element that holds none. Only text counts: a comment or a processing instruction is not a text node and must not be reported here, since neither affects whether the element is :empty (selectors-4 sec. 13.2). A backend that answers [] for an element that does hold text makes that element match :empty.