From 7a4349c3320b1d0c3cc46f5fdda1c48bbe97ce3f Mon Sep 17 00:00:00 2001 From: Patrik Johnson Date: Thu, 12 Jan 2017 01:41:15 +0200 Subject: [PATCH] Fix small typos in the rewrite docs (#1533) --- docs/autoredraw.md | 2 +- docs/hyperscript.md | 2 +- docs/redraw.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/autoredraw.md b/docs/autoredraw.md index 97a4575d..a3a1360a 100644 --- a/docs/autoredraw.md +++ b/docs/autoredraw.md @@ -87,7 +87,7 @@ m.route(document.body, "/", { --- -### When Mithril does not redraws +### When Mithril does not redraw Mithril does not redraw after `setTimeout`, `setInterval`, `requestAnimationFrame` and 3rd party library event handlers (e.g. Socket.io callbacks). In those cases, you must manually call [`m.redraw()`](redraw.md). diff --git a/docs/hyperscript.md b/docs/hyperscript.md index 6108f2d5..f1fb04ca 100644 --- a/docs/hyperscript.md +++ b/docs/hyperscript.md @@ -170,7 +170,7 @@ Mithril supports both strings and objects as valid `style` values. In other word ```javascript m("div", {style: "background:red;"}) m("div", {style: {background: "red"}}) -m("div[style=background:red") +m("div[style=background:red]") ``` Using a string as a `style` would overwrite all inline styles in the element if it is redrawn, and not only CSS rules whose values have changed. diff --git a/docs/redraw.md b/docs/redraw.md index be215e18..85b397dc 100644 --- a/docs/redraw.md +++ b/docs/redraw.md @@ -14,7 +14,7 @@ You DON'T need to call it if data is modified within the execution context of an You DO need to call it in `setTimeout`/`setInterval`/`requestAnimationFrame` callbacks, or callbacks from 3rd party libraries. -Typically, `m.redraw` triggers an asynchronous redraws, but it may trigger synchronously if Mithril detects it's possible to improves performance by doing so (i.e. if no redraw was requested within the last animation frame). You should write code assuming that it always redraws asynchronously. +Typically, `m.redraw` triggers an asynchronous redraws, but it may trigger synchronously if Mithril detects it's possible to improve performance by doing so (i.e. if no redraw was requested within the last animation frame). You should write code assuming that it always redraws asynchronously. ---