1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-28 21:32:20 +00:00

edit Promise typo

This commit is contained in:
ruanyf 2015-10-06 19:10:02 +08:00
parent 0246e72052
commit 6d71bba4ed

View File

@ -487,7 +487,7 @@ p.then(null, function (s){
我们可以将图片的加载写成一个`Promise`,一旦加载完成,`Promise`的状态就发生变化。 我们可以将图片的加载写成一个`Promise`,一旦加载完成,`Promise`的状态就发生变化。
```javascript ```javascript
conset preloadImage = function (path) { const preloadImage = function (path) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
var image = new Image(); var image = new Image();
image.onload = resolve; image.onload = resolve;