Refactor scripts (#2465)

* Refactor all kinds of scripts

* Update docs to ensure linter passes
This commit is contained in:
Isiah Meadows 2019-07-27 15:12:49 -04:00 committed by GitHub
parent 62172cbe08
commit 48e7fd1711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 1695 additions and 340 deletions

View file

@ -349,7 +349,7 @@ m("div", m(Component, "value", function(key) { return "child" }))
In v0.2.x, the children of DOM nodes were represented literally with no normalization aside from using the children directly if only a single array child is present. It returned a structure more like this, with the strings represented literally.
```js
```javascript
m("div", "value", ["nested"])
// Becomes:
@ -365,7 +365,7 @@ m("div", "value", ["nested"])
In v2.x, children of DOM vnodes are normalized to objects of a single consistent structure.
```js
```javascript
m("div", "value", ["nested"])
// Becomes roughly:
@ -383,7 +383,7 @@ m("div", "value", ["nested"])
If only a single text child is present on a DOM vnode, it instead sets `text` to that value.
```js
```javascript
m("div", "value")
// Becomes roughly: