Merge branch 'next' into components
This commit is contained in:
commit
a7052510d6
2 changed files with 2 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ m.route(document.body, "/", {
|
||||||
m.route("/dashboard"); // logs "unloading home"
|
m.route("/dashboard"); // logs "unloading home"
|
||||||
```
|
```
|
||||||
|
|
||||||
This mechanism is useful to clear timers and unsubscribe event handlers. If you have a hierarchy of components, you can recursively call `unload` on all the components in the tree or use a [pubsub](http://microjs.com/#pubsub) library to unload specific components on demand.
|
This mechanism is useful to clear timers and unsubscribe event handlers. If you have a hierarchy of components, you can recursively call `onunload` on all the components in the tree or use a [pubsub](http://microjs.com/#pubsub) library to unload specific components on demand.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1104,6 +1104,7 @@ var m = (function app(window, undefined) {
|
||||||
var extract = xhrOptions.extract || function(xhr) {
|
var extract = xhrOptions.extract || function(xhr) {
|
||||||
return xhr.responseText.length === 0 && deserialize === JSON.parse ? null : xhr.responseText
|
return xhr.responseText.length === 0 && deserialize === JSON.parse ? null : xhr.responseText
|
||||||
};
|
};
|
||||||
|
xhrOptions.method = (xhrOptions.method || 'GET').toUpperCase();
|
||||||
xhrOptions.url = parameterizeUrl(xhrOptions.url, xhrOptions.data);
|
xhrOptions.url = parameterizeUrl(xhrOptions.url, xhrOptions.data);
|
||||||
xhrOptions = bindData(xhrOptions, xhrOptions.data, serialize);
|
xhrOptions = bindData(xhrOptions, xhrOptions.data, serialize);
|
||||||
xhrOptions.onload = xhrOptions.onerror = function(e) {
|
xhrOptions.onload = xhrOptions.onerror = function(e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue