Commit graph

2664 commits

Author SHA1 Message Date
1111hui
8550501fb2 FIX: ES3 props keyword bug in IE8; eslint errors 2016-06-20 15:41:50 +08:00
Isiah Meadows
0294293f82 Merge pull request #1117 from epidemian/remove-peristent-unloaders
Remove unloaders when root element is removed
2016-06-18 15:35:18 -04:00
Demian Ferreiro
3e51c8c2ff Remove unloaders when root element is removed
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.
2016-06-18 07:41:49 -03:00
Isiah Meadows
02cc4ec1d6 Fix whitespace/etc. in examples (#1115) 2016-06-18 03:39:55 -04:00
Isiah Meadows
8d4db4bfa9 Merge pull request #1114 from isiahmeadows/editorconfig
Add an editorconfig to the rewrite
2016-06-18 03:28:02 -04:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Pat Cavit
73dbc149b5 Merge pull request #1111 from djtango/patch-1
Update mithril.md
2016-06-17 09:10:12 -07:00
Deon Tan
6ffeeaa19d Update mithril.md
Should component be MyComponent?
2016-06-17 16:13:02 +01:00
Isiah Meadows
5cff2945b2 Merge pull request #1110 from isiahmeadows/next
Add definition file to npm
2016-06-17 06:14:55 -04:00
impinball
cb10456bbe Add definition file to npm [ci skip] 2016-06-17 06:09:04 -04:00
Leo Horie
c55917d21a Merge pull request #1106 from epidemian/fix-1091
Fix #1091 Value on select tag not set when options are changed
2016-06-13 11:13:32 -04:00
Demian Ferreiro
f3dd4fce7d Fix #1091 set correct select value when options change
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.
2016-06-13 03:55:57 -03:00
Demian Ferreiro
1b36f2b720 Add test for select value render edge case 2016-06-13 02:38:51 -03:00
Sebastian Sandqvist
80d0a69dab Add migration docs for m.route.prefix (#1104)
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.
2016-06-11 11:45:55 -07:00
Leo Horie
8faab54c4c Merge pull request #1103 from brlewis/next
Render booleans as empty strings
2016-06-10 15:26:33 -04:00
Bruce Lewis
c98f663653 Render booleans as empty strings 2016-06-10 11:00:56 -04:00
Leo Horie
6f865f6abf duplicate test fix into old test suite 2016-06-10 10:30:31 -04:00
Leo Horie
693c87f5f1 fix svg class updates 2016-06-07 20:20:30 -04:00
Leo Horie
6ff63b224c expose m to window 2016-06-07 10:57:20 -04:00
Leo Horie
4b6c4254ba s/shouldUpdate/onbeforeupdate 2016-06-06 09:59:35 -04:00
Leo Horie
8ee75924c8 issue template 2016-06-06 09:53:37 -04:00
Leo Horie
9f91858843 Merge remote-tracking branch 'origin/next' into next 2016-06-06 09:22:20 -04:00
Leo Horie
3cf16631a0 fix valueless attributes #1093 2016-06-06 09:21:58 -04:00
Leo Horie
4ea487a9e3 ospec: exit w/ error if test failed 2016-06-05 22:07:29 -04:00
Leo Horie
7a0369c092 Merge pull request #1096 from RichardIvan/patch-3
ospec exit on error
2016-06-05 21:59:24 -04:00
Richard Ivan
991483bfc5 exit on error
exit on error to be able to rerun the process
2016-06-05 17:58:28 +02:00
Leo Horie
ece9376711 Merge pull request #1094 from syaiful6/select2-docs
update integration docs
2016-06-05 11:21:06 -04:00
Syaiful Bahri
52b0918297 update integration docs
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/
2016-06-05 12:02:55 +07:00
Leo Horie
41c7a61960 Merge remote-tracking branch 'origin/rewrite' into rewrite 2016-06-03 23:55:56 -04:00
Leo Horie
ddc430a6d3 fix most gcc warnings 2016-06-03 23:55:31 -04:00
Leo Horie
2289061f90 fix doc 2016-06-03 16:53:24 -04:00
Pat Cavit
d05b155abc Add more docs around m.route (#1089) 2016-06-03 11:33:46 -07:00
Leo Horie
ca784a684e fix svg across component boundaries 2016-06-03 12:27:24 -04:00
Leo Horie
7b268c6ee8 expose setPath and getPath 2016-06-03 08:59:52 -04:00
Leo Horie
f9ef480b34 fix bugs about recycling in components, and styles when reusing style object 2016-06-02 21:42:18 -04:00
Leo Horie
86673f8d16 add missing fields to avoid monomorphism-related deopts 2016-06-02 21:41:19 -04:00
Leo Horie
474c43e433 update style if it's mutated object 2016-06-02 18:47:41 -04:00
Leo Horie
15373057df ensure multiple attributes work at the same time as attrs w/ square brackets 2016-06-01 16:22:37 -04:00
Leo Horie
c79b4545c2 fix empty array case for Promise.all 2016-06-01 16:22:03 -04:00
Leo Horie
9a396c5173 use promise polyfill 2016-06-01 15:44:08 -04:00
Leo Horie
b2b0ab34dd parse pattern attribute correctly 2016-06-01 15:43:42 -04:00
Leo Horie
e48265dec8 Merge remote-tracking branch 'origin/next' into next 2016-06-01 15:42:32 -04:00
Leo Horie
80349b3c74 #1080 parse pattern attribute correctly 2016-06-01 15:42:08 -04:00
Leo Horie
d4e8911c9c Merge remote-tracking branch 'origin/rewrite' into rewrite 2016-06-01 01:25:10 -04:00
Leo Horie
0d274ae6ac ospec: don't show null stack trace on timeout 2016-06-01 01:24:40 -04:00
Leo Horie
2e6e1c73d0 promises: A+ compliance, better async, unhandled rejection reporter 2016-06-01 01:24:14 -04:00
Pat Cavit
da8018b441 Re-generate bundle (#1085) 2016-05-31 17:12:31 -07:00
Leo Horie
2f772bcd0c Merge pull request #1084 from tivac/default-npm-tag
Default to always using "beta" tag for rewrite
2016-05-31 14:33:40 -04:00
Pat Cavit
8dee570602 Default to always using "beta" tag for rewrite
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.
2016-05-31 11:12:57 -07:00
Leo Horie
53705b6d20 Merge pull request #1083 from kcjpop/docs/fix-typo
Fix a typo of component args in migration guide
2016-05-31 10:02:06 -04:00