hpehl
released this
05 Dec 08:26
This release adds one breaking change, some minor enhancements, and several deprecations. The main focus is to clean up the API for Elemento 1.0.
Breaking Changes
IsElement<E extends HTMLElement>
: The method to return the element was renamed fromasElement()
toelement()
. The interfaceIsElement
was introduced in Elemento as the counterpart tocom.google.gwt.user.client.ui.IsWidget
, which has a methodasWidget()
. As Elemento moves away from widgets and GWT 2, I'd like to reflect this in the API. That was the main motivation to rename the method inIsElement
.
Enhancements
ElementsBuilder
is now a real builder and implementsTypedBuilder<Iterable<HTMLElement>, ElementsBuilder>
.Elements.collect()
replacesElements.elements()
.
Deprecations
HasElements
: Will be removed w/o replacement. Please useIterable<HTMLElement>
instead.ElementBuilder.asElement()
andElementBuilder.element()
: In order to cleanup the API and to avoid multiple methods which do (or return) the same thing, builders won't no longer implementIsElement<E>
. Please useget()
instead. A builder is a builder and not an element.LazyElement.asElement()
: Please useLazyElement.element()
instead.ElementsBuilder.addAll(HasElements)
: Please useElementsBuilder.addAll(Iterable)
instead.HtmlContent.addAll(HasElements)
: Please useHtmlContent.addAll(Iterable)
instead.Elements.elements()
: Please useElements.collect()
instead.Widgets.asElement(IsWidget)
: Please useWidgets.element(IsWidget)
instead.Widgets.asElement(Widget)
: Please useWidgets.element(Widget)
instead.Widgets.asElement(com.google.gwt.dom.client.Element)
: Please useWidgets.element(com.google.gwt.dom.client.Element)
instead.Widgets.asWidget(IsElement)
: Please useWidgets.widget(IsElement)
instead.Widgets.asWidget(HTMLElement)
: Please useWidgets.widget(HTMLElement)
instead.
I'm looking forward to feedback about the API changes. Any ideas, suggestions, and critic are welcome. The goal is to improve and finalize the API in order to get closer to a 1.0 release.