Fix small typos in the rewrite docs (#1533)
This commit is contained in:
parent
68f832d776
commit
7a4349c332
3 changed files with 3 additions and 3 deletions
|
|
@ -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).
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue