Commit graph

571 commits

Author SHA1 Message Date
Leo Horie
0159cd667a Merge pull request #1253 from pygy/fix-1252
Fix #1252, re-fix #348
2016-08-17 22:17:44 -04:00
Pierre-Yves Gerardy
51bfd511d2 Fix #1252, re-fix #348 2016-08-18 01:20:13 +02:00
jsguy
c6d57c7f53 Set dependencies when no window for isomorphic compatibility 2016-08-13 11:07:21 +10:00
Leo Horie
6fe960ee8a Merge pull request #1071 from husio/toJSON
JSON.stringify(m.prop(x)) use x.toJSON method when possible
2016-08-12 00:45:27 -04:00
Nikolay Kim
6d4d0f104f Fix broken tests 2016-08-06 20:35:46 +03:00
Nikolay Kim
505bd1337a IE8 compatibility fixes 2016-08-06 11:00:09 +03:00
Lei Yang
cde0e348a4 fix potential overwriting of onunload.$old 2016-08-03 19:31:36 +08:00
Isiah Meadows
72b6c1e68d Merge pull request #1159 from kronion/issue-956-fix-m.trust-offsets
Patch for #956: redraw trusted content with multiple nodes
2016-07-23 08:47:35 -04:00
Pierre-Yves Gerardy
b000781555 Resore m.factory 2016-07-18 20:13:17 +02:00
Collin Stedman
62ae1e8b48 Patch for #956: redraw trusted content with multiple nodes 2016-07-18 01:28:48 -04:00
ludbek
8d14e811f9 proper component check at m() 2016-07-11 10:55:30 +05:45
darda
c17ea5bbc8 Push route to history stack, when using parameters
Bugfix for issue #1124
The condition has been changed, which is deciding to push the a route to history stack.
I think, it is necessary to compare the old route with the current route, instead of old route with root (without parameters).
2016-07-06 16:00:39 +02:00
Jared Jacobs
e9e2a45caa Fixing m.route() after a canceled navigation (#1126) 2016-06-29 22:48:45 -07:00
1111hui
2c3d3e5df0 cleanup and apply editorconfig 2016-06-20 16:15:59 +08:00
1111hui
8550501fb2 FIX: ES3 props keyword bug in IE8; eslint errors 2016-06-20 15:41:50 +08: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
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
Bruce Lewis
c98f663653 Render booleans as empty strings 2016-06-10 11:00:56 -04:00
Leo Horie
3cf16631a0 fix valueless attributes #1093 2016-06-06 09:21:58 -04:00
Leo Horie
474c43e433 update style if it's mutated object 2016-06-02 18:47:41 -04:00
Leo Horie
80349b3c74 #1080 parse pattern attribute correctly 2016-06-01 15:42:08 -04:00
Leo Horie
b128fd8232 don't shortcircuit promise check for objects 2016-05-26 11:45:48 -04:00
Leo Horie
ce748f9f71 check for existence of Promise before doing check against it 2016-05-26 11:30:27 -04:00
Leo Horie
0ad6749f87 callbackName 2016-05-26 11:19:39 -04:00
Leo Horie
bdd65b3b86 Merge remote-tracking branch 'origin/next' into next 2016-05-26 11:04:51 -04:00
Leo Horie
bf85b7a530 #1076 absorb native promise in m.prop 2016-05-26 11:04:04 -04:00
Piotr Husiatyński
c71e8f4fcb JSON.stringify(m.prop(x)) use x.toJSON method when possible
When JSON serializing m.prop, check if wrapped object does define toJSON method
and if so, return it's result.
2016-05-25 11:12:36 +02:00
Ian Henderson
1673579d32 Add replaceScriptNodes function 2016-05-19 09:53:09 -07:00
Leo Horie
d19ce8e598 Merge remote-tracking branch 'origin/next' into next 2016-05-13 06:55:44 -04:00
Leo Horie
a7496a1ef7 Merge branch 'spike' of https://github.com/mtwtkman/mithril.js into mtwtkman-spike
Conflicts:
	mithril.min.js
	mithril.min.js.map
2016-05-13 06:54:51 -04:00
Leo Horie
0c19bf72ee Merge pull request #1037 from omakasecorp/next
Force redirect when pushState encounters an error
2016-05-11 11:53:36 -04:00
Leo Horie
dee64503db #1039 ignore url interpolations without mapped values 2016-05-06 11:49:00 -04:00
Leo Horie
db17958f0b #691 sync input if user-set DOM value 2016-05-05 13:12:36 -04:00
Adam Gschwender
6face740f5 Force redirect when pushState encounters an error
Version 9.1 of Safari allows a maximum of 100 calls to pushState.
Subsequent calls to pushState throw a SecurityError: DOM Exception 18:
An attempt was made to break through the security policy of the user
agent.
2016-05-04 20:25:35 -04:00
mtwtkman
af0a63f850 Bump to v0.2.4 for m.version 2016-04-26 20:58:20 +09:00
Gyandeep Singh
d451def561 Update: Big Perf improvement for IE (fixes #199) 2016-04-20 13:44:15 -05:00
Leo Horie
f226d56481 Merge remote-tracking branch 'origin/next' into next 2016-04-20 00:36:48 -04:00
Leo Horie
da586de7dc don't swallow runtime errors in request 2016-04-20 00:35:53 -04:00
robinchew
4308b182ca Traceur Support
traceur --script mithril-v0.2.3.js code-that-calls-m.js
2016-04-15 03:10:50 +08:00
Leo Horie
cb966d9088 don't throw reference error if event is synthetic and forgets to pass e arg 2016-04-13 15:32:58 -04:00
impinball
a07483a164 Actually lint core, regenerate minified files 2016-03-28 07:54:26 -04:00
Isiah Meadows
8f348435e4 Merge pull request #1002 from isiahmeadows/arg-fix
Serialize arguments correctly in m.component
2016-03-28 06:37:17 -04:00
impinball
07244b1999 Serialize arguments correctly in m.component 2016-03-28 06:28:51 -04:00
yuyang
82d65b076a change new Array => [] 2016-03-25 12:47:03 +08:00
Leo Horie
fcf6e16929 Merge pull request #975 from barneycarroll/empty-attrs-string
Empty attributes. Fixes #971
2016-03-19 22:36:32 -04:00
Isiah Meadows
806e0a8dc1 Merge pull request #973 from isiahmeadows/lint
Make linter happy with mithril.js
2016-03-17 23:56:13 -04:00
Leo Horie
64d1ce1d7d Merge branch 'next' of github.com:lhorie/mithril.js into next 2016-03-16 01:07:07 -04:00
Leo Horie
96bf37588b trailing semi-colon 2016-03-16 01:06:35 -04:00
Pat Cavit
eac505aead Use for-loop to map arguments instead of slice
http://jsperf.com/arguments-slice-vs-for-loop-copy
2016-03-09 14:33:52 -08:00
Barney Carroll
10f30dfa2e Remove redundant logic as per @niothiel's tip 2016-03-03 15:26:09 +00:00