I am passed to the method #renderContentOn: of components unless #rendererClass has been redefined. On top of the basic XHTML construction methods inherited from WAAbstractHtmlBuilder, I provide an interface to attach event handlers to anchors and to form-elements.
To render any kind of squeak object call the message #render: It will do a double dispatch and call #renderOn: on this object. For example:
html render: 'Some text'.
html render: 123. " will print the child "
html render: nil. " will do nothing "
html render: #( 'a' 'b' 'c' ). " will print every element "
html render: businessObject. " will print the #asString of your object "
html render: childComponent. " will render the child component "
This kind of double dispatch can be used with any xhtml-generating method:
html divNamed: 'child' with: childComponent.
html bold: #( 1 'First' ).
|