New features
- Provide
$element
to template event handlers(click)="$server.clickOnText($element.textContent)
- Refers to the element that has the listener, not
$event.target
- Generalize
@EventHandler
from Template into a Component feature$server
callbacks available inelement.$server
on the client side@EventHandler public void MyComponent.publishedMethod(int someNumber);
on the server defines the method,theElement.$server.publishedMethod(42)
on the client invokes the method
- Add
Element.callFunction
for invoking JavaScript methods on elements- e.g.
myWebComponent.getElement().callFunction("setValue",12)
- e.g.
Fixes
- Throw an exception if arrays are used in a Template Model
- Ensure assertion errors are not shown as empty messages
- Fix unclear error message for
@EventHandler
method with non-void return type - Don't include
<script>
from Template into pre-render HTML
Demos
No changes