2019-03-23 14:00:39 +00:00
|
|
|
abstract class DomBuilder<T> {
|
2019-03-23 14:07:40 +00:00
|
|
|
DomBuilderElement<T> append(
|
|
|
|
String tagName, void Function(DomBuilderElement<T>) f);
|
2019-03-23 14:00:39 +00:00
|
|
|
|
2019-03-23 14:07:40 +00:00
|
|
|
void text(String value);
|
2019-03-23 14:00:39 +00:00
|
|
|
}
|
|
|
|
|
2019-03-23 14:07:40 +00:00
|
|
|
abstract class DomBuilderElement<T> extends DomBuilder<T> {
|
|
|
|
void attr(String name, [String value]);
|
|
|
|
|
|
|
|
void attrs(Map<String, String> map);
|
|
|
|
|
2019-03-23 14:00:39 +00:00
|
|
|
T close();
|
|
|
|
}
|