Merge branch 'next' into patch-10
This commit is contained in:
commit
6876cb025a
2 changed files with 7 additions and 7 deletions
|
|
@ -95,7 +95,7 @@ Let's wrap our text in an `<h1>` tag.
|
||||||
m.render(root, m("h1", "My first app"))
|
m.render(root, m("h1", "My first app"))
|
||||||
```
|
```
|
||||||
|
|
||||||
The `m()` function can be used to describe any HTML structure you want. So if you to add a class to the `<h1>`:
|
The `m()` function can be used to describe any HTML structure you want. So if you need to add a class to the `<h1>`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
m("h1", {class: "title"}, "My first app")
|
m("h1", {class: "title"}, "My first app")
|
||||||
|
|
|
||||||
|
|
@ -635,12 +635,12 @@ greetAsync()
|
||||||
### `v1.x`
|
### `v1.x`
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var greetAsync = function(){
|
var greetAsync = function() {
|
||||||
return new Promise(function(resolve){
|
return new Promise(function(resolve){
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
resolve("hello")
|
resolve("hello")
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
greetAsync()
|
greetAsync()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue