Commit graph

15 commits

Author SHA1 Message Date
Isiah Meadows
90bcff0fa7
Deduplicate m.route and m.redraw logic (#2453)
- Remove appropriate route change subcriptions when a root is removed
  via `m.mount(root, null)`.
- Don't pollute `onpopstate` and friends - use standard event listeners
  instead.
- Simplify and streamline subscriptions, in preparation of adding a
  `remove` parameter to `m.mount`.
- Change the redraw internals to redraw immediately, with ability to
  cancel via returning a sentinel.
- Change `"bleeding-edge"` for `m.version` in `next` to instead just be
  the latest `m.version`. (If you're using `next`, you should know what
  you're in for.)
- Update tests to be aware of these changes. (Some were failing for
  subtle reasons.)
- Drive-by: remove some uses of `string.charAt(n)` and use `string[n]`
  instead.
2019-07-05 18:52:06 -04:00
Isiah Meadows
462fb659d7
Fix event handler this value, simplify redraw handling (#2320)
Shaves 10 bytes off the bundle from smaller name + reduced indirection
2018-12-03 06:35:27 -05:00
Isiah Meadows
4a641092dc
Officially drop IE9-10 support, pull out our hacks (#2296)
- I also fixed a bunch of related comments
- I had to polyfill `requestAnimationFrame` for Node
- Drive-by: run `eslint . --fix`
- Drive-by: update transpiling info in CONTRIBUTING.md
- Drive-by: we aren't the only ones going semicolon-free
2018-11-27 18:04:15 -05:00
Pierre-Yves Gérardy
8a4280eb42 api/redraw, console check for IE9 compat. 2017-09-25 17:03:48 +02:00
Pierre-Yves Gérardy
cf9a31b7b0 api/redraw: Log render() errors. 2017-09-24 21:09:36 +02:00
Pierre-Yves Gérardy
8ab31790ab Merge pull request #1592 from pygy/async-redraw
Make m.redraw() purely asynchronous, add m.redraw.sync()
2017-07-17 23:16:44 +02:00
Pierre-Yves Gérardy
198f9ca7a9 Reset e.redraw when it was set to false. fixes #1850 2017-07-06 19:48:47 +02:00
Pierre-Yves Gérardy
ccb3d61675 Make redraw monolithic, add m.redraw.sync 2017-06-13 16:27:54 +02:00
Pierre-Yves Gerardy
b004c20f0c Make m.redraw() strictly asynchronous 2017-06-13 15:20:29 +02:00
Gyandeep Singh
daf5a64697 Chore: Fix lint issues and add indent with tabs 2017-03-11 15:54:41 -06:00
Leo
a89e8cd405 add docs about mixed keys 2017-02-03 22:56:34 -05:00
Leo Horie
2ffd2fb7e4 throttle m.route redraws 2016-12-04 01:53:39 -05:00
Leo Horie
713c25c9c0 fix #1404 2016-12-01 01:45:07 -05:00
Leo Horie
0005cf26ee refactor redraw into pubsub and autoredraw
- pubsub is a basic pubsub impl
- autoredraw is glue code to register callback to pubsub and onevent

moved e.redraw to autoredraw
2016-05-21 00:37:34 -04:00
Pat Cavit
71c77ba603 Add m.redraw() support for multiple mount points
To better match `0.2.x` behavior: https://jsfiddle.net/xbpyqL9k/
2016-05-20 15:27:17 -07:00