Commit graph

438 commits

Author SHA1 Message Date
impinball
565f9cf334 Merge branch 'next' of https://github.com/impinball/mithril.js into speed
(Update topic branch)
2015-07-23 05:20:36 -04:00
impinball
9ae592ee4d Do some local style modifications and profile.
1. Do some temporary style modifications to help make the code more readable
   for profiling (with help from ESLint).
2. Profile the code, and optimize accordingly.
2015-07-23 05:17:02 -04:00
Leo Horie
aeedc6fbb0 Merge pull request #720 from impinball/next
Forgot to assign the default argument
2015-07-14 19:15:38 -04:00
Leo Horie
7732f28cad style 2015-07-14 19:11:45 -04:00
Leo Horie
dcbb82f7d2 Merge remote-tracking branch 'origin/next' into next 2015-07-14 19:11:31 -04:00
Leo Horie
6040a4dc67 prevent null ref 2015-07-14 19:11:11 -04:00
Leo Horie
3894ec683c make controller inherit from prototype if in m.component 2015-07-14 19:10:12 -04:00
impinball
fcb5842938 Fix default assign 2015-07-13 15:12:25 -04:00
impinball
a22710284e Fix default assign 2015-07-13 15:00:10 -04:00
impinball
a4e6567b82 Forgot to assign the default argument 2015-07-13 14:53:26 -04:00
impinball
c0830ee3d6 Refactor a couple pointless variables out 2015-07-10 13:15:03 -04:00
impinball
83a30a4d3c Add type-checking methods, make a few things stop de-opting under Chrome 2015-07-09 15:31:13 -04:00
impinball
b28045aa60 Add parameter names to m.route 2015-07-09 14:19:47 -04:00
impinball
293df33858 Dry up code in build 2015-07-09 14:10:59 -04:00
impinball
c764f8d826 Use named arguments in m 2015-07-09 13:17:33 -04:00
Leo Horie
919f443099 simplify condition 2015-06-29 09:35:04 -04:00
Leo Horie
dbc3bc81e4 Merge pull request #692 from pelonpelon/patch-15
mithril.js: fix if clause that expects truthy value. issue: #689
2015-06-29 09:34:52 -04:00
Leo Horie
8da643c13f use bracket syntax for reserved keyword 2015-06-29 09:22:20 -04:00
pelonpelon
72b705b918 mithril.js: fix if clause that expects truthy value. issue: #689
When key=0 the if statement doesn't do what is intended.
2015-06-25 18:25:49 -05:00
Leo Horie
505d7b930d #686 prevent redraw lock on error 2015-06-23 13:43:54 -04:00
Leo Horie
04911d38a5 Merge remote-tracking branch 'origin/next' into next
Conflicts:
	mithril.js
2015-06-23 13:38:31 -04:00
Leo Horie
1e0ad6c3d7 ensure we can still redraw after a promise error that gets thrown by the exception monitor 2015-06-22 18:41:53 -04:00
Adam Vlasak
fe7683fce8 fixed missing semicolons 2015-06-20 19:19:54 +02:00
Christopher Venning
05e6088f13 Consistency: use variable instead of literal 2015-06-18 17:19:15 -04:00
Leo Horie
c57b0b4047 prevent nonsensical IE error 2015-06-09 16:27:57 -05:00
Leo Horie
e6d6db6123 Merge remote-tracking branch 'origin/next' into next 2015-06-09 16:22:20 -05:00
Leo Horie
f6d436da68 prevent nonsensical IE error 2015-06-09 16:21:55 -05:00
nasitra
756cbb1924 Remove unused variables 2015-06-07 20:38:08 +09:00
Jason Staten
a406de408a Triple equals 2015-06-02 06:44:42 -06:00
Jason Staten
d89810234a accept component as first argument to m() 2015-06-01 15:11:44 -06:00
Leo Horie
2d5d042131 allow m.redraw(true) to force-render component 2015-05-05 21:16:29 -04:00
Gilbert
dfb37fec9c Add catch to promise-like objects 2015-05-01 15:31:06 -05:00
Leo Horie
47cc6a7b03 make it possible to return subtree directive as root 2015-04-28 15:56:43 -04:00
Leo Horie
0870839e90 don't allow extract option to break jsonp 2015-04-24 15:55:11 -04:00
Leo Horie
86deb2fcb6 oops. fix brokenness 2015-04-22 23:00:34 -04:00
Leo Horie
2de9985a34 throw error if entering infinite redirect loop 2015-04-22 20:45:37 -04:00
Leo Horie
f0b20da30a update docs about config: m.route 2015-04-22 20:32:39 -04:00
Leo Horie
51d073e414 Merge remote-tracking branch 'origin/next' into components 2015-04-22 20:22:12 -04:00
Leo Horie
675f66a44b improve error message 2015-04-22 20:20:43 -04:00
Trent Oswald
1d6405e547 Added check for this.attrs into m.route
m.route('path'), when called programmatically (not attached to an anchor
tag), did not update the url in the navigation bar. I tracked it to this
error, where it is searching for an elements attributes, sepecifically
the this.attrs.href, which did not exist when called programatically.
The error returning was "Cannot read property 'href' of undefined",
which linked back to line 618 in the mithril core file.

I added a simple check to see if this.attrs exists before calling in
.href. Fixed it like a charm. I tried to follow the current coding
style, but let me know if there is something amiss in my change.

I ran both grunt test and grunt testall and everything seemed to run
perfect.
2015-04-22 10:31:33 -06:00
Toby Zerner
23766a5cbe Prevent scroll on redraw inside onunload if previous onunload calls preventDefault
https://github.com/lhorie/mithril.js/issues/560#issuecomment-93876904
2015-04-22 07:48:43 +09:30
Leo Horie
3fd7013d90 Merge pull request #571 from tobscure/redraw-all-fix
Fix nodes without config not being cleared when redraw strategy is all
2015-04-21 10:53:20 -04:00
Leo Horie
dbee97bf04 ensure component lifecycle works for components with implicit controllers 2015-04-21 09:23:55 -04:00
Toby Zerner
46406095f2 Fix nodes without config not being cleared when redraw strategy is all
Nodes without a config function never get a configContext, and thus the
logic to ensure they are cleared on a full redraw was broken.
2015-04-21 11:47:53 +09:30
Leo Horie
15c0686b27 prevent early redraw of component w/ routed async components 2015-04-20 12:41:51 -04:00
Leo Horie
cf1f316bee don't redraw component before async service finishes 2015-04-20 11:20:04 -04:00
Leo Horie
cc8cac358a #567 reset scroll before config runs 2015-04-18 22:39:59 -04:00
Leo Horie
ec8e42a923 clean up dead variable 2015-04-18 09:17:37 -04:00
Leo Horie
6c32afea43 #569 fix diff edge case w/ select input 2015-04-17 22:21:03 -04:00
Leo Horie
006445960b clean up 2015-04-17 22:13:15 -04:00