diff --git a/docs/change-log.md b/docs/change-log.md index bf474720..1d9c7b6a 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,5 +1,20 @@ ## Change Log +[v0.2.5](http://mithril.js.org/archive/v0.2.5) + +### News: + +- performance improvements in IE (thanks to @gyandeeps) +- m.request now has a `callbackName` option to specify the name of the javascript function that gets called on JSONP response [#1072](https://github.com/lhorie/mithril.js/issues/1072) + +### Bug Fixes: + +- fix active form element syncing [#691](https://github.com/lhorie/mithril.js/issues/691) +- ignore url interpolations without value in m.request [#1039](https://github.com/lhorie/mithril.js/issues/1039) +- fixed native promise absorption in `m.prop` [#1076](https://github.com/lhorie/mithril.js/issues/1076) + +--- + [v0.2.4](http://mithril.js.org/archive/v0.2.4) ### Bug Fixes: diff --git a/docs/mithril.request.md b/docs/mithril.request.md index 96defe1d..fb29d28e 100644 --- a/docs/mithril.request.md +++ b/docs/mithril.request.md @@ -448,6 +448,7 @@ where: String dataType, String url, String callbackKey, + String callbackName, Object data } ``` @@ -661,6 +662,12 @@ where: This option is useful for web services that use uncommon conventions for defining jsonp callbacks (e.g. foo.com/?jsonpCallback=doSomething) + - **String callbackName** + + The name of callback function to be called by the response. Defaults to a unique auto-generated name + + This option is useful for web services serving static files and to prevent cache busting. + - **Object data** (optional) Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on `method` diff --git a/mithril.js b/mithril.js index b93e2654..464e8a5f 100644 --- a/mithril.js +++ b/mithril.js @@ -2042,7 +2042,7 @@ function identity(value) { return value } function handleJsonp(options) { - var callbackKey = "mithril_callback_" + + var callbackKey = options.callbackName || "mithril_callback_" + new Date().getTime() + "_" + (Math.round(Math.random() * 1e16)).toString(36)