Merge pull request #1074 from StephanHoyer/patch-3

Adding how you could access the DOM element in the new lifecycle methods
This commit is contained in:
Leo Horie 2016-05-25 17:42:07 -04:00
commit 7e437f27a8

View file

@ -42,6 +42,8 @@ m("div", {
});
```
If available the DOM-Element of the vnode can be accessed at `vnode.dom`.
## Cancelling redraw from event handlers
`m.mount()` and `m.route()` still automatically redraw after a DOM event handler runs. Cancelling these redraws from within your event handlers is now done by setting the `redraw` property on the passed-in event object to `false`.