[IMP] blockdom: t-on supports synthetic and native event handler

Synthetic handler is a sort of event delegation that allows placing
only one listener on the document to improve performance. It is an opt-in option.

Native listener places the listener on the node itself.
This commit is contained in:
Lucas Perais (lpe)
2021-10-26 11:01:57 +02:00
committed by Aaron Bohy
parent 3eb63452e7
commit 2ae0149adb
9 changed files with 244 additions and 18 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ describe("event handling", () => {
expect(fixture.innerHTML).toBe("<span><div>simple vnode</div>2</span>");
});
test.skip("support for callable expression in event handler", async () => {
test("support for callable expression in event handler", async () => {
class Counter extends Component {
static template = xml`
<div><t t-esc="state.value"/><input type="text" t-on-input="obj.onInput"/></div>`;