When a controller calls preventDefault on its onunload method, it prevents the current root element from being unmounted via a route change. But it does not prevent it from being unmounted via m.mount(root, null). In that case, the root element is unmounted, but any unloaders that it had keep hanging on the `unloaders` array, and that prevented any future m.mount(root, component) calls from succeeding. This is what was happening on the pending route() tests.
The fix is pretty simple: just reset the `unloaders` array when removing the root element, just like it's done when no unloader calls preventDefault.
Also, 2 of the 4 pending tests were removed because they were identical to the other 2.
Always consider the edge case of setting a <select> value when building an object. When a <select> node is reused, its option children can change, so its value attribute has to be re-assigned after its children have been recreated/updated.
Also made a change in the documentation around passing components to `m()`. Before, the syntax that was used made it look like jsx, which could easily have been misinterpreted. Since `component` is defined in the docs just prior, I don't think we need any special syntax to indicate that it might have been a placeholder value.
correct the code example to avoid infinite loop
the infinite loop occure because the code example also
update the value on change handler. issue #954.
prove https://jsfiddle.net/syaiful6/kps3gabo/
See https://docs.npmjs.com/files/package.json#publishconfig and
https://docs.npmjs.com/misc/config#tag
This way when `rewrite` starts being published users will need to
install it as `npm install mithril@beta` to get the rewrite. When people
run `npm install mithril` it'll use the default `latest` tag and that
will continue to point to the `0.2.x` branch until the rewrite is fully
ready.