From 72a0a0c35260592974bf269110701e5df2561a68 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Mon, 2 Dec 2024 10:48:16 +0100 Subject: [PATCH] Documentation --- docs/builder-api.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/builder-api.md b/docs/builder-api.md index c1e4bfa01..05692b38e 100644 --- a/docs/builder-api.md +++ b/docs/builder-api.md @@ -67,16 +67,23 @@ final HTMLElement footer = footer() The builders in Elemento are of one of the following classes: -- [`HTMLContainerBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLContainerBuilder.html) -- [`HTMLElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLElementBuilder.html) -- [`HTMLInputElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLInputElementBuilder.html) -- [`HTMLTextAreaElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLTextAreaElementBuilder.html) +- [ + `HTMLContainerBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLContainerBuilder.html) +- [ + `HTMLElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLElementBuilder.html) +- [ + `HTMLInputElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLInputElementBuilder.html) +- [ + `HTMLTextAreaElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLTextAreaElementBuilder.html) For [MathML](mathml.md) and [SVG](svg.md), the builders are -- [`MathMLElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/mathml/MathMLElementBuilder.html) -- [`SVGElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/svg/SVGElementBuilder.html) -- [`SVGContainerBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/svg/SVGContainerBuilder.html) +- [ + `MathMLElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/mathml/MathMLElementBuilder.html) +- [ + `SVGElementBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/svg/SVGElementBuilder.html) +- [ + `SVGContainerBuilder`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/svg/SVGContainerBuilder.html) All builders encapsulate a given element and implement `TypedBuilder>` to make builders work with inheritance. Apart from that, all builders are kept very simple and don't define their own methods. For example, this is @@ -113,8 +120,8 @@ The interface names follow the pattern `[HTML|MathML|SVG]ElementMethods`. - [`HTMLInputElementMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLInputElementMethods.html) - [`SVGElementStyleMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/SVGElementStyleMethods.html) -If you only use Elemento to create a DOM tree quickly and easily, you will most likely hardly come into touch with the _method_ -interfaces. However, if you want to create your own builders, these interfaces come in very handy. You can have very +If you only use Elemento to create a DOM tree quickly and easily, you won't most likely come into touch with these _method_ +interfaces. However, if you want to create your own builders, the interfaces come in very handy. You can have very fine-grained control over which methods your builder should provide. And since these methods are defined as default methods in interfaces, you are free to mix and match the interfaces across different builders without worrying about multiple inheritance.