It's basically a factory of Node. Implement this interface to create reusable HTML fragments.

For example a snippet to build a modal dialog, like this:

shared class Dialog(String title, Boolean closeable = true,
             Div body, Button* buttons = {})
         satisfies Snippet<Div> {

     content => Div {
         classNames = "modal";
         Aria {
             role = dialog;
         };
         Div {
             classNames = "modal-header";
             H4(title),
             closeable then Button {
                 "&times;";
                 classNames = "close";
             }
         },
         Div {
             classNames = "modal-body";
             body
         },
         Div {
             classNames = "modal-footer";
             buttons
         }
     }
}

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

Attributes
contentSource Codeshared formal Result|{Result*}|Null content

Build the snippet content.

stringSource Codeshared actual default String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Inherited Attributes
Attributes inherited from: Object
Inherited Methods
Methods inherited from: Object