From 0c5babd300c4c82763cdf612f593ededcb40847b Mon Sep 17 00:00:00 2001 From: Tim Wisniewski Date: Mon, 5 Sep 2016 10:12:32 -0400 Subject: [PATCH] Docs: Add reminder about e.stopPropagation() (#247) Per yoshuawuyts/sheet-router#50 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index caaa159..c9c0c08 100644 --- a/README.md +++ b/README.md @@ -555,8 +555,9 @@ html` Example listeners include: `onclick`, `onsubmit`, `oninput`, `onkeydown`, `onkeyup`. A full list can be found [at the yo-yo repo](https://github.com/maxogden/yo-yo/blob/master/update-events.js). When -creating listeners always remember to call `e.preventDefault()` on the event so -it doesn't bubble up and do stuff like refreshing the full page or the like. +creating listeners always remember to call `e.preventDefault()` and +`e.stopPropagation()` on the event so it doesn't bubble up and do stuff like +refreshing the full page or the like. To trigger lifecycle events on any part of a view, set the `onload=${(el) => {}}` and `onunload=${() => {el}}` attributes. These parameters are useful when