Merge remote-tracking branch 'origin/next' into components
This commit is contained in:
commit
06c6e56cc4
5 changed files with 14 additions and 5 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
- fix routing bug in IE9 [#320](https://github.com/lhorie/mithril.js/issues/320)
|
- fix routing bug in IE9 [#320](https://github.com/lhorie/mithril.js/issues/320)
|
||||||
- fix ordering bug in m.trust when using HTML entities [#453](https://github.com/lhorie/mithril.js/issues/453)
|
- fix ordering bug in m.trust when using HTML entities [#453](https://github.com/lhorie/mithril.js/issues/453)
|
||||||
|
- set promise's default value to initialValue if coming from m.request [#454](https://github.com/lhorie/mithril.js/issues/454)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -433,8 +433,8 @@ where:
|
||||||
[Object<any> data,]
|
[Object<any> data,]
|
||||||
[Boolean background,]
|
[Boolean background,]
|
||||||
[any initialValue,]
|
[any initialValue,]
|
||||||
[any unwrapSuccess(any data),]
|
[any unwrapSuccess(any data, XMLHttpRequest xhr),]
|
||||||
[any unwrapError(any data),]
|
[any unwrapError(any data, XMLHttpRequest xhr),]
|
||||||
[String serialize(any dataToSerialize),]
|
[String serialize(any dataToSerialize),]
|
||||||
[any deserialize(String dataToDeserialize),]
|
[any deserialize(String dataToDeserialize),]
|
||||||
[any extract(XMLHttpRequest xhr, XHROptions options),]
|
[any extract(XMLHttpRequest xhr, XHROptions options),]
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ You can use it by adding a reference to your Typescript files. This will allow t
|
||||||
|
|
||||||
### Internet Explorer Compatibility
|
### Internet Explorer Compatibility
|
||||||
|
|
||||||
Mithril relies on some Ecmascript 5 features, namely: `Array::indexOf`, `Array::map` and `Object::keys`, as well as the `JSON` object.
|
Mithril relies on some ECMAScript 5 features, namely: `Array::indexOf`, `Array::map` and `Object::keys`, as well as the `JSON` object. Internet Explorer 8 lacks native support for some of these features.
|
||||||
|
|
||||||
The easiest way to polyfill these features is to include this script:
|
The easiest way to polyfill these features is to include this script:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -786,7 +786,8 @@ var m = (function app(window, undefined) {
|
||||||
var prop = m.prop();
|
var prop = m.prop();
|
||||||
promise.then(prop);
|
promise.then(prop);
|
||||||
prop.then = function(resolve, reject) {
|
prop.then = function(resolve, reject) {
|
||||||
return propify(promise.then(resolve, reject))
|
promise = promise.then(resolve, reject).then(prop);
|
||||||
|
return prop;
|
||||||
};
|
};
|
||||||
return prop
|
return prop
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2227,6 +2227,13 @@ function testMithril(mock) {
|
||||||
xhr.onreadystatechange()
|
xhr.onreadystatechange()
|
||||||
return xhr.$headers["Content-Type"] === undefined
|
return xhr.$headers["Content-Type"] === undefined
|
||||||
})
|
})
|
||||||
|
test(function() {
|
||||||
|
var prop = m.request({method: "POST", url: "test", initialValue: "foo"}).then(function(data) { return data; })
|
||||||
|
var initialValue = prop();
|
||||||
|
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
|
||||||
|
|
||||||
|
return initialValue === "foo"
|
||||||
|
})
|
||||||
test(function() {
|
test(function() {
|
||||||
var prop = m.request({method: "POST", url: "test", initialValue: "foo"})
|
var prop = m.request({method: "POST", url: "test", initialValue: "foo"})
|
||||||
var initialValue = prop();
|
var initialValue = prop();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue