No matching definitions.

html/edit

src/html/edit.tur

innerHTML and outerHTML for edited HTML documents.

Since: 0.2.0

defn

set-inner-html!

(set-inner-html! [el : Node src : cstr] :)

replace an element's children with parsed markup.

elan HTML element of an HTML Document
srcthe markup

(Result nil EditError) -- `WrongKind` when `el` is not an HTML element of an HTML Document (an SVG element, say, or anything in an XML one); `BadPlacement` for a void element such as <br> given content.

(set-inner-html! ul "<li>one<li>two")   ; two <li> children

Since: 0.2.0

defn

node-inner-html

(node-inner-html [n : Node] :)

the serialized children of a node (innerHTML).

nthe node

String -- owned; release it when done.

(to-cstr (node-inner-html p))   ; => "a <b>b</b> c"

Since: 0.2.0

defn

node-outer-html

(node-outer-html [n : Node] :)

the serialized node itself (outerHTML).

nthe node

String -- owned; release it when done.

(to-cstr (node-outer-html p))   ; => "<p>a <b>b</b> c</p>"

Since: 0.2.0

Internal definitions
__he-context-ok-- internal: 0 when el is an HTML element of an HTML
__he-replace-- internal: put copies of the fragment's top-level nodes in
__he-error-- internal: a turdom error code as an EditError.
__he-inner-raw-- internal: the children's serializations, concatenated.