From 4deeeb486b16c04bd4bfbd38365a04e25fbf2704 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Mon, 19 Jan 2015 20:55:26 -0500 Subject: [PATCH] push layout --- archive/v0.1.28/auto-redrawing.html | 124 ++++++------- archive/v0.1.28/benchmarks.html | 124 ++++++------- archive/v0.1.28/change-log.html | 184 +++++++++---------- archive/v0.1.28/community.html | 124 ++++++------- archive/v0.1.28/comparison.html | 124 ++++++------- archive/v0.1.28/components.html | 124 ++++++------- archive/v0.1.28/getting-started.html | 124 ++++++------- archive/v0.1.28/how-to-read-signatures.html | 184 +++++++++---------- archive/v0.1.28/index.html | 2 +- archive/v0.1.28/installation.html | 124 ++++++------- archive/v0.1.28/integration.html | 124 ++++++------- archive/v0.1.28/mithril-tests.js | 9 +- archive/v0.1.28/mithril.computation.html | 184 +++++++++---------- archive/v0.1.28/mithril.deferred.html | 184 +++++++++---------- archive/v0.1.28/mithril.deps.html | 184 +++++++++---------- archive/v0.1.28/mithril.html | 184 +++++++++---------- archive/v0.1.28/mithril.js | 9 +- archive/v0.1.28/mithril.min.js | 2 +- archive/v0.1.28/mithril.min.js.map | 2 +- archive/v0.1.28/mithril.min.zip | Bin 80682 -> 80682 bytes archive/v0.1.28/mithril.module.html | 184 +++++++++---------- archive/v0.1.28/mithril.prop.html | 184 +++++++++---------- archive/v0.1.28/mithril.redraw.html | 184 +++++++++---------- archive/v0.1.28/mithril.render.html | 184 +++++++++---------- archive/v0.1.28/mithril.request.html | 187 ++++++++++---------- archive/v0.1.28/mithril.route.html | 184 +++++++++---------- archive/v0.1.28/mithril.sync.html | 184 +++++++++---------- archive/v0.1.28/mithril.trust.html | 184 +++++++++---------- archive/v0.1.28/mithril.withAttr.html | 184 +++++++++---------- archive/v0.1.28/mithril.xhr.html | 2 +- archive/v0.1.28/optimizing-performance.html | 124 ++++++------- archive/v0.1.28/practices.html | 124 ++++++------- archive/v0.1.28/refactoring.html | 2 +- archive/v0.1.28/roadmap.html | 184 +++++++++---------- archive/v0.1.28/routing.html | 124 ++++++------- archive/v0.1.28/tools.html | 124 ++++++------- archive/v0.1.28/web-services.html | 124 ++++++------- 37 files changed, 2289 insertions(+), 2298 deletions(-) diff --git a/archive/v0.1.28/auto-redrawing.html b/archive/v0.1.28/auto-redrawing.html index a8c1cc30..d2fbbbda 100644 --- a/archive/v0.1.28/auto-redrawing.html +++ b/archive/v0.1.28/auto-redrawing.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + The Auto-Redrawing System - Mithril + + + + +
+ +
+
+
+
+
+ +

The Auto-Redrawing System

Mithril is designed around the principle that data always flows from the model to the view. This makes it easy to reason about the state of the UI and to test it. In order to implement this principle, the rendering engine must run a redraw algorithm globally to ensure no parts of the UI are out of sync with the data. While at first glance, it may seem expensive to run a global redraw every time data changes, Mithril makes it possible to do this efficiently thanks to its fast diffing algorithm, which only updates the DOM where it needs to be updated. Because the DOM is by far the largest bottleneck in rendering engines, Mithril's approach of running a diff against a virtual representation of the DOM and only batching changes to the real DOM as needed is surprisingly performant.

In addition, Mithril attempts to intelligently redraw only when it is appropriate in an application lifecycle. Most frameworks redraw aggressively and err on the side of redrawing too many times because, as it turns out, determining the best time to do a redraw is quite complicated if we want to be as efficient as possible.

@@ -135,18 +135,18 @@ var doBoth = function(callback) { }); }; - -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/benchmarks.html b/archive/v0.1.28/benchmarks.html index f74ee73d..51bc0854 100644 --- a/archive/v0.1.28/benchmarks.html +++ b/archive/v0.1.28/benchmarks.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + Benchmarks - Mithril + + + + +
+ +
+
+
+
+
+ +

Benchmarks

These benchmarks were designed to measure Javascript running time for Mithril in comparison with other popular Javascript MVC frameworks. Javascript running time is significant because the gzipped size of a framework can be misleading in terms of how much code actually runs on page loads. In my experience, page loads happen far more commonly than one would expect in single page applications: power users open multiple tabs, and mobile users open and close the browser very frequently. And as far as templating engines go, the initial page load represents the worst case for the rendering algorithm since there is very little room for performance optimization tricks. It's arguably also one of the most important metrics when it comes to performance.

The numbers shown here are best-run results for all frameworks, except for Mithril's case, for which I'm taking the worst-run result. The numbers aren't statistically rigorous (e.g. I didn't bother to calculate standard deviation), but they should be enough to give a rough idea of what is faster than what.

@@ -81,18 +81,18 @@

There's a TodoMVC benchmark with a variety of popular and obscure frameworks here:

http://matt-esch.github.io/mercury-perf/

The benchmark consists of creating 100 todos, marking them as completed, and then deleting them. It aims to give an idea of how frameworks perform under real-world-ish conditions running idiomatic code (as opposed to micro-benchmarks, which tend to take advantage of obscure tricks and aggressive optimizations that sacrifice maintainability for extra speed).

- -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/change-log.html b/archive/v0.1.28/change-log.html index 46fe8ed1..92bdbdf8 100644 --- a/archive/v0.1.28/change-log.html +++ b/archive/v0.1.28/change-log.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
- -
-
-
-
-
-
-

API (v0.1.28)

-

Core

- -

Routing

- -

Data

- -

HTML

- -

Rendering

- -

Testing

- - -

History

- -
-
+ + + + Change Log - Mithril + + + + +
+ +
+
+
+
+
+
+

API (v0.1.28)

+

Core

+ +

Routing

+ +

Data

+ +

HTML

+ +

Rendering

+ +

Testing

+ + +

History

+ +
+

Change Log

v0.1.28 - maintenance

News:

@@ -429,18 +429,18 @@ m.request({method: "GET", url: "http://foo.com/api", config:

v0.1 - Initial release

- -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/community.html b/archive/v0.1.28/community.html index 81027147..3d2a6a4a 100644 --- a/archive/v0.1.28/community.html +++ b/archive/v0.1.28/community.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + Community - Mithril + + + + +
+ +
+
+
+
+
+ +

Community

Learn Mithril

Read Mithril tutorials and articles about web app development.

@@ -67,18 +67,18 @@

Bug Tracker

You can file bugs in the issues page on Github

- -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/comparison.html b/archive/v0.1.28/comparison.html index b6db3eb0..f44d390a 100644 --- a/archive/v0.1.28/comparison.html +++ b/archive/v0.1.28/comparison.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + How is Mithril Different from Other Frameworks - Mithril + + + + +
+ +
+
+
+
+
+ +

How is Mithril Different from Other Frameworks

There are a lot of different Javascript frameworks and evaluating their merits and shortcomings can be a daunting task.

This page aims to provide a comparison between Mithril and some of the most widely used frameworks, as well as some of the younger, but relevant ones.

@@ -113,18 +113,18 @@

The most relevant difference is that Vue uses browser features that don't work (and cannot be made to work) in Internet Explorer 8 and lower. Mithril does not rely on unpolyfillable features, so developers can support browsers all the way back to IE6 and Blackberry by using shims if support for those older browsers is required.

Vue's implementation cleverly hijacks array methods, but it should be noted that Javascript Arrays cannot be truly subclassed and as such, Vue suffers from abstraction leaks.

In contrast, Mithril avoids "magic" types.

- -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/components.html b/archive/v0.1.28/components.html index 7aa99a1e..2f8c55e1 100644 --- a/archive/v0.1.28/components.html +++ b/archive/v0.1.28/components.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + Components - Mithril + + + + +
+ +
+
+
+
+
+ +

Components

Widgetization

Components are Mithril's mechanism for hierarchical MVC.

@@ -235,18 +235,18 @@ dashboard.view = function() { m.module(document.body, dashboard);

In the usage example above, we created a dashboard top-level module, and instantiated two autocompleter modules, along with some data to populate the autocompleter, and getter-setters to bind data to.

- -
-
-
-
-
-
-
- Released under the MIT license -
© 2014 Leo Horie -
-
- - - \ No newline at end of file + +
+
+
+
+
+ + + + diff --git a/archive/v0.1.28/getting-started.html b/archive/v0.1.28/getting-started.html index b44a66ca..478bc5cd 100644 --- a/archive/v0.1.28/getting-started.html +++ b/archive/v0.1.28/getting-started.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
- -
-
-
-
-
- -
+ + + + Getting Started - Mithril + + + + +
+ +
+
+
+
+
+ +

Getting Started

What is Mithril?

Mithril is a client-side Javascript MVC framework, i.e. it's a tool to make application code divided into a data layer (called Model), a UI layer (called View), and a glue layer (called Controller)

@@ -490,18 +490,18 @@ this.description(data.description)
  • Good Practices
  • Useful Tools
  • - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/how-to-read-signatures.html b/archive/v0.1.28/how-to-read-signatures.html index 77586d05..fd86efb6 100644 --- a/archive/v0.1.28/how-to-read-signatures.html +++ b/archive/v0.1.28/how-to-read-signatures.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + How to Read Signatures - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    How to Read Signatures

    Rather than providing concrete classes like other frameworks, Mithril provides methods that operate on plain old Javascript objects (POJOs) that match given signatures.

    A signature is a description of its static type. For functions, it shows the parameters of the function, its return value and their expected types. For objects and arrays, it shows the expected data structure and the expected types of their members.

    @@ -189,18 +189,18 @@ test({ first: "first", config: function(element) { /*do stuff*/ } })

    And we also define it as a list of arguments (note that lack of square brackets)

    m("div", {title: "foo"}, "child 1", "child 2", "child 3")
     
    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/index.html b/archive/v0.1.28/index.html index acd01a11..80082847 100644 --- a/archive/v0.1.28/index.html +++ b/archive/v0.1.28/index.html @@ -1,7 +1,7 @@ - Mithril + <%= topic %>Mithril diff --git a/archive/v0.1.28/installation.html b/archive/v0.1.28/installation.html index 581a9571..33f792fe 100644 --- a/archive/v0.1.28/installation.html +++ b/archive/v0.1.28/installation.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Installation - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Installation

    Mithril is available from a variety of sources:


    @@ -105,18 +105,18 @@

    Note that Mithril uses the next branch as the stable branch, instead of master, because contributors usually use master for pull requests. Therefore, the master branch should be considered unstable, and should not be used.

    Be aware that even though Mithril has tests running in a continuous integration environment, the bleeding edge version might occasionally break. If you're interested in helping improve Mithril, you're welcome to use the bleeding edge version and report any bugs that you find.

    In order to update a forked version of Mithril, follow the instructions on this page.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/integration.html b/archive/v0.1.28/integration.html index e5b1d8e8..3537a0f1 100644 --- a/archive/v0.1.28/integration.html +++ b/archive/v0.1.28/integration.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Integrating with Other Libraries - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Integrating with Other Libraries

    Integration with third party libraries or vanilla javascript code can be achieved via the config attribute of virtual elements.

    It's recommended that you encapsulate integration code in a component or a helper function.

    @@ -145,18 +145,18 @@ m.module(document.getElementById("widget2-container"), widget1) m.endComputation() - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/mithril-tests.js b/archive/v0.1.28/mithril-tests.js index ca8f71e6..014f9d52 100644 --- a/archive/v0.1.28/mithril-tests.js +++ b/archive/v0.1.28/mithril-tests.js @@ -18,13 +18,13 @@ var m = (function app(window, undefined) { initialize(window); - /* + /** * @typedef {String} Tag * A string that looks like -> div.classname#id[param=one][param2=two] * Which describes a DOM node */ - /* + /** * * @param {Tag} The DOM node tag * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs @@ -689,13 +689,10 @@ var m = (function app(window, undefined) { var pairs = str.split("&"), params = {}; for (var i = 0, len = pairs.length; i < len; i++) { var pair = pairs[i].split("="); - params[decodeSpace(pair[0])] = pair[1] ? decodeSpace(pair[1]) : "" + params[decodeURIComponent(pair[0])] = pair[1] ? decodeURIComponent(pair[1]) : "" } return params } - function decodeSpace(string) { - return decodeURIComponent(string.replace(/\+/g, " ")) - } function reset(root) { var cacheKey = getCellCacheKey(root); clear(root.childNodes, cellCache[cacheKey]); diff --git a/archive/v0.1.28/mithril.computation.html b/archive/v0.1.28/mithril.computation.html index e77f20fe..681475d8 100644 --- a/archive/v0.1.28/mithril.computation.html +++ b/archive/v0.1.28/mithril.computation.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.startComputation / m.endComputation - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.startComputation / m.endComputation


      @@ -261,18 +261,18 @@ m.endComputation()
      void endComputation()
       
      - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/mithril.deferred.html b/archive/v0.1.28/mithril.deferred.html index 1b26fc46..a2c77912 100644 --- a/archive/v0.1.28/mithril.deferred.html +++ b/archive/v0.1.28/mithril.deferred.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.deferred - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.deferred


      @@ -259,18 +259,18 @@ where:

      This method gets called every time an exception is thrown inside a promise callback. By default, it rethrows to the console if an error is a subclass of Error (but not an instance of Error itself). Otherwise it follows the Promises/A+ specifications.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/mithril.deps.html b/archive/v0.1.28/mithril.deps.html index d4cbb3b1..535054b2 100644 --- a/archive/v0.1.28/mithril.deps.html +++ b/archive/v0.1.28/mithril.deps.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.deps - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.deps


      @@ -120,18 +120,18 @@ where:

      The returned window is the same as what is passed in.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/mithril.html b/archive/v0.1.28/mithril.html index 5312bf84..b45dfe61 100644 --- a/archive/v0.1.28/mithril.html +++ b/archive/v0.1.28/mithril.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m


      @@ -478,18 +478,18 @@ m.render(document, m("a")); //logs `unloaded the div` and `alert` neve

      The returned VirtualElement is a Javascript data structure that represents the DOM element to be rendered by m.render

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    + + + + diff --git a/archive/v0.1.28/mithril.js b/archive/v0.1.28/mithril.js index 4c547994..ddd94405 100644 --- a/archive/v0.1.28/mithril.js +++ b/archive/v0.1.28/mithril.js @@ -18,13 +18,13 @@ var m = (function app(window, undefined) { initialize(window); - /* + /** * @typedef {String} Tag * A string that looks like -> div.classname#id[param=one][param2=two] * Which describes a DOM node */ - /* + /** * * @param {Tag} The DOM node tag * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs @@ -689,13 +689,10 @@ var m = (function app(window, undefined) { var pairs = str.split("&"), params = {}; for (var i = 0, len = pairs.length; i < len; i++) { var pair = pairs[i].split("="); - params[decodeSpace(pair[0])] = pair[1] ? decodeSpace(pair[1]) : "" + params[decodeURIComponent(pair[0])] = pair[1] ? decodeURIComponent(pair[1]) : "" } return params } - function decodeSpace(string) { - return decodeURIComponent(string.replace(/\+/g, " ")) - } function reset(root) { var cacheKey = getCellCacheKey(root); clear(root.childNodes, cellCache[cacheKey]); diff --git a/archive/v0.1.28/mithril.min.js b/archive/v0.1.28/mithril.min.js index 7623867d..ae9547c3 100644 --- a/archive/v0.1.28/mithril.min.js +++ b/archive/v0.1.28/mithril.min.js @@ -4,5 +4,5 @@ http://github.com/lhorie/mithril.js (c) Leo Horie License: MIT */ -var m=function a(b,c){function d(a){D=a.document,E=a.location,G=a.cancelAnimationFrame||a.clearTimeout,F=a.requestAnimationFrame||a.setTimeout}function e(){var a,b=[].slice.call(arguments),c=!(null==b[1]||L.call(b[1])!==H||"tag"in b[1]||"subtree"in b[1]),d=c?b[1]:{},e="class"in d?"class":"className",f={tag:"div",attrs:{}},g=[];if(L.call(b[0])!=J)throw new Error("selector in m(selector, attrs, children) should be a string");for(;a=M.exec(b[0]);)if(""===a[1]&&a[2])f.tag=a[2];else if("#"===a[1])f.attrs.id=a[2];else if("."===a[1])g.push(a[2]);else if("["===a[3][0]){var h=N.exec(a[3]);f.attrs[h[1]]=h[3]||(h[2]?"":!0)}g.length>0&&(f.attrs[e]=g.join(" "));var i=c?b[2]:b[1];f.children=L.call(i)===I?i:b.slice(c?2:1);for(var j in d)f.attrs[j]=j===e?(f.attrs[j]||"")+" "+d[j]:d[j];return f}function f(a,b,d,e,j,l,m,n,o,p,q){if((null==j||null==j.toString())&&(j=""),"retain"===j.subtree)return l;var r=L.call(l),s=L.call(j);if(null==l||r!==s){if(null!=l)if(d&&d.nodes){var t=n-e,u=t+(s===I?j:l.nodes).length;i(d.nodes.slice(t,u),d.slice(t,u))}else l.nodes&&i(l.nodes,l);l=new j.constructor,l.tag&&(l={}),l.nodes=[]}if(s===I){for(var v=0,w=j.length;w>v;v++)L.call(j[v])===I&&(j=j.concat.apply([],j),v--);for(var x=[],y=l.length===j.length,z=0,A=1,B=2,C=3,E={},F=[],G=!1,v=0;v-1&&(j=j.filter(function(a){return null!=a}));var M=!1;if(j.length!=l.length)M=!0;else for(var N,P,v=0;N=l[v],P=j[v];v++)if(N.attrs&&P.attrs&&N.attrs.key!=P.attrs.key){M=!0;break}if(M){for(var v=0,w=j.length;w>v;v++)if(j[v]&&j[v].attrs)if(null!=j[v].attrs.key){var Q=j[v].attrs.key;E[Q]=E[Q]?{action:C,index:v,from:E[Q].index,element:a.childNodes[E[Q].index]||D.createElement("div")}:{action:B,index:v}}else F.push({index:v,element:a.childNodes[v]||D.createElement("div")});var R=[];for(var S in E)R.push(E[S]);for(var T,U=R.sort(g),V=new Array(l.length),v=0;T=U[v];v++){if(T.action===A&&(i(l[T.index].nodes,l[T.index]),V.splice(T.index,1)),T.action===B){var W=D.createElement("div");W.key=j[T.index].attrs.key,a.insertBefore(W,a.childNodes[T.index]||null),V.splice(T.index,0,{attrs:{key:j[T.index].attrs.key},nodes:[W]})}T.action===C&&(a.childNodes[T.index]!==T.element&&null!==T.element&&a.insertBefore(T.element,a.childNodes[T.index]||null),V[T.index]=l[T.from])}for(var v=0,w=F.length;w>v;v++){var T=F[v];a.insertBefore(T.element,a.childNodes[T.index]||null),V[T.index]=l[T.index]}l=V,l.nodes=new Array(a.childNodes.length);for(var X,v=0;X=a.childNodes[v];v++)l.nodes[v]=X}}for(var v=0,Y=0,w=j.length;w>v;v++){var Z=f(a,b,l,n,j[v],l[Y],m,n+z||z,o,p,q);Z!==c&&(Z.nodes.intact||(y=!1),z+=Z.$trusted?(Z.match(/<[^\/]|\>\s*[^<]/g)||[]).length:L.call(Z)===I?Z.length:1,l[Y++]=Z)}if(!y){for(var v=0,w=j.length;w>v;v++)null!=l[v]&&x.push.apply(x,l[v].nodes);for(var $,v=0;$=l.nodes[v];v++)null!=$.parentNode&&x.indexOf($)<0&&i([$],[l[v]]);j.length("key"in j.attrs?1:0);if((j.tag!=l.tag||_.join()!=Object.keys(l.attrs).join()||j.attrs.id!=l.attrs.id)&&(l.nodes.length&&i(l.nodes),l.configContext&&typeof l.configContext.onunload===K&&l.configContext.onunload()),L.call(j.tag)!=J)return;var $,bb=0===l.nodes.length;if(j.attrs.xmlns?p=j.attrs.xmlns:"svg"===j.tag?p="http://www.w3.org/2000/svg":"math"===j.tag&&(p="http://www.w3.org/1998/Math/MathML"),bb?($=j.attrs.is?p===c?D.createElement(j.tag,j.attrs.is):D.createElementNS(p,j.tag,j.attrs.is):p===c?D.createElement(j.tag):D.createElementNS(p,j.tag),l={tag:j.tag,attrs:ab?h($,j.tag,j.attrs,{},p):j.attrs,children:null!=j.children&&j.children.length>0?f($,j.tag,c,c,j.children,l.children,!0,0,j.attrs.contenteditable?$:o,p,q):j.children,nodes:[$]},l.children&&!l.children.nodes&&(l.children.nodes=[]),"select"===j.tag&&j.attrs.value&&h($,j.tag,{value:j.attrs.value},{},p),a.insertBefore($,a.childNodes[n]||null)):($=l.nodes[0],ab&&h($,j.tag,j.attrs,l.attrs,p),l.children=f($,j.tag,c,c,j.children,l.children,!1,0,j.attrs.contenteditable?$:o,p,q),l.nodes.intact=!0,m===!0&&null!=$&&a.insertBefore($,a.childNodes[n]||null)),typeof j.attrs.config===K){var cb=l.configContext=l.configContext||{},db=function(a,b){return function(){return a.attrs.config.apply(a,b)}};q.push(db(j,[$,!bb,cb,l]))}}else if(typeof s!=K){var x;0===l.nodes.length?(j.$trusted?x=k(a,n,j):(x=[D.createTextNode(j)],a.nodeName.match(O)||a.insertBefore(x[0],a.childNodes[n]||null)),l="string number boolean".indexOf(typeof j)>-1?new j.constructor(j):j,l.nodes=x):l.valueOf()!==j.valueOf()||m===!0?(x=l.nodes,o&&o===D.activeElement||(j.$trusted?(i(x,l),x=k(a,n,j)):"textarea"===b?a.value=j:o?o.innerHTML=j:((1===x[0].nodeType||x.length>1)&&(i(l.nodes,l),x=[D.createTextNode(j)]),a.insertBefore(x[0],a.childNodes[n]||null),x[0].nodeValue=j)),l=new j.constructor(j),l.nodes=x):l.nodes.intact=!0}return l}function g(a,b){return a.action-b.action||a.index-b.index}function h(a,b,c,d,e){for(var f in c){var g=c[f],h=d[f];if(f in d&&h===g)"value"===f&&"input"===b&&a.value!=g&&(a.value=g);else{d[f]=g;try{if("config"===f||"key"==f)continue;if(typeof g===K&&0===f.indexOf("on"))a[f]=l(g,a);else if("style"===f&&null!=g&&L.call(g)===H){for(var i in g)(null==h||h[i]!==g[i])&&(a.style[i]=g[i]);for(var i in h)i in g||(a.style[i]="")}else null!=e?"href"===f?a.setAttributeNS("http://www.w3.org/1999/xlink","href",g):"className"===f?a.setAttribute("class",g):a.setAttribute(f,g):f in a&&"list"!==f&&"style"!==f&&"form"!==f&&"type"!==f?("input"!==b||a[f]!==g)&&(a[f]=g):a.setAttribute(f,g)}catch(j){if(j.message.indexOf("Invalid argument")<0)throw j}}}return d}function i(a,b){for(var c=a.length-1;c>-1;c--)if(a[c]&&a[c].parentNode){try{a[c].parentNode.removeChild(a[c])}catch(d){}b=[].concat(b),b[c]&&j(b[c])}0!=a.length&&(a.length=0)}function j(a){if(a.configContext&&typeof a.configContext.onunload===K&&a.configContext.onunload(),a.children)if(L.call(a.children)===I)for(var b,c=0;b=a.children[c];c++)j(b);else a.children.tag&&j(a.children)}function k(a,b,c){var d=a.childNodes[b];if(d){var e=1!=d.nodeType,f=D.createElement("span");e?(a.insertBefore(f,d||null),f.insertAdjacentHTML("beforebegin",c),a.removeChild(f)):d.insertAdjacentHTML("beforebegin",c)}else a.insertAdjacentHTML("beforeend",c);for(var g=[];a.childNodes[b]!==d;)g.push(a.childNodes[b]),b++;return g}function l(a,b){return function(c){c=c||event,e.redraw.strategy("diff"),e.startComputation();try{return a.call(b,c)}finally{ab()}}}function m(a){var b=R.indexOf(a);return 0>b?R.push(a)-1:b}function n(a){var b=function(){return arguments.length&&(a=arguments[0]),a};return b.toJSON=function(){return a},b}function o(){for(var a,b="all"===e.redraw.strategy(),c=0;a=U[c];c++)W[c]&&e.render(a,V[c].view(W[c]),b);Z&&(Z(),Z=null),X=null,Y=new Date,e.redraw.strategy("diff")}function p(a){return a.slice(db[e.route.mode].length)}function q(a,b,c){bb={};var d=c.indexOf("?");-1!==d&&(bb=u(c.substr(d+1,c.length)),c=c.substr(0,d));for(var f in b){if(f===c)return e.module(a,b[f]),!0;var g=new RegExp("^"+f.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(g.test(c))return c.replace(g,function(){for(var c=f.match(/:[^\/]+/g)||[],d=[].slice.call(arguments,1,-2),g=0,h=c.length;h>g;g++)bb[c[g].replace(/:|\./g,"")]=decodeURIComponent(d[g]);e.module(a,b[f])}),!0}}function r(a){if(a=a||event,!a.ctrlKey&&!a.metaKey&&2!==a.which){a.preventDefault?a.preventDefault():a.returnValue=!1;var b=a.currentTarget||this,c="pathname"===e.route.mode&&b.search?u(b.search.slice(1)):{};e.route(b[e.route.mode].slice(db[e.route.mode].length),c)}}function s(){"hash"!=e.route.mode&&E.hash?E.hash=E.hash:b.scrollTo(0,0)}function t(a,b){var c=[];for(var d in a){var e=b?b+"["+d+"]":d,f=a[d];c.push(null!=f&&L.call(f)===H?t(f,e):encodeURIComponent(e)+"="+encodeURIComponent(f))}return c.join("&")}function u(a){for(var b=a.split("&"),c={},d=0,e=b.length;e>d;d++){var f=b[d].split("=");c[v(f[0])]=f[1]?v(f[1]):""}return c}function v(a){return decodeURIComponent(a.replace(/\+/g," "))}function w(a){var b=m(a);i(a.childNodes,S[b]),S[b]=c}function x(a){var b=e.prop();return a.then(b),b.then=function(b,c){return x(a.then(b,c))},b}function y(a,b){function c(a){l=a||j,n.map(function(a){l===i&&a.resolve(m)||a.reject(m)})}function d(a,b,c,d){if((null!=m&&L.call(m)===H||typeof m===K)&&typeof a===K)try{var f=0;a.call(m,function(a){f++||(m=a,b())},function(a){f++||(m=a,c())})}catch(g){e.deferred.onerror(g),m=g,c()}else d()}function f(){var j;try{j=m&&m.then}catch(n){return e.deferred.onerror(n),m=n,l=h,f()}d(j,function(){l=g,f()},function(){l=h,f()},function(){try{l===g&&typeof a===K?m=a(m):l===h&&"function"==typeof b&&(m=b(m),l=g)}catch(f){return e.deferred.onerror(f),m=f,c()}m===k?(m=TypeError(),c()):d(j,function(){c(i)},c,function(){c(l===g&&i)})})}var g=1,h=2,i=3,j=4,k=this,l=0,m=0,n=[];k.promise={},k.resolve=function(a){return l||(m=a,l=g,f()),this},k.reject=function(a){return l||(m=a,l=h,f()),this},k.promise.then=function(a,b){var c=new y(a,b);return l===i?c.resolve(m):l===j?c.reject(m):n.push(c),c.promise}}function z(a){return a}function A(a){if(!a.dataType||"jsonp"!==a.dataType.toLowerCase()){var d=new b.XMLHttpRequest;if(d.open(a.method,a.url,!0,a.user,a.password),d.onreadystatechange=function(){4===d.readyState&&(d.status>=200&&d.status<300?a.onload({type:"load",target:d}):a.onerror({type:"error",target:d}))},a.serialize===JSON.stringify&&a.data&&"GET"!==a.method&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),a.deserialize===JSON.parse&&d.setRequestHeader("Accept","application/json, text/*"),typeof a.config===K){var e=a.config(d,a);null!=e&&(d=e)}var f="GET"!==a.method&&a.data?a.data:"";if(f&&L.call(f)!=J&&f.constructor!=b.FormData)throw"Request data should be either be a string or FormData. Check the `serialize` option in `m.request`";return d.send(f),d}var g="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),h=D.createElement("script");b[g]=function(d){D.body.removeChild(h),a.onload({type:"load",target:{responseText:d}}),b[g]=c},h.onerror=function(){return D.body.removeChild(h),a.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),b[g]=c,!1},h.onload=function(){return!1},h.src=a.url+(a.url.indexOf("?")>0?"&":"?")+(a.callbackKey?a.callbackKey:"callback")+"="+g+"&"+t(a.data||{}),D.body.appendChild(h)}function B(a,b,c){if("GET"===a.method&&"jsonp"!=a.dataType){var d=a.url.indexOf("?")<0?"?":"&",e=t(b);a.url=a.url+(e?d+e:"")}else a.data=c(b);return a}function C(a,b){var c=a.match(/:[a-z]\w+/gi);if(c&&b)for(var d=0;dk;k++)e[k]()},e.trust=function(a){return a=new String(a),a.$trusted=!0,a},e.prop=function(a){return(null!=a&&L.call(a)===H||typeof a===K)&&typeof a.then===K?x(a):n(a)};var T,U=[],V=[],W=[],X=null,Y=0,Z=null,$=16;e.module=function(a,b){if(!a)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var c=U.indexOf(a);0>c&&(c=U.length);var d=!1;if(W[c]&&typeof W[c].onunload===K){var f={preventDefault:function(){d=!0}};W[c].onunload(f)}if(!d){e.redraw.strategy("all"),e.startComputation(),U[c]=a;var g=T=b,h=new b.controller;return g===T&&(W[c]=h,V[c]=b),ab(),W[c]}},e.redraw=function(a){X&&a!==!0?(new Date-Y>$||F===b.requestAnimationFrame)&&(X>0&&G(X),X=F(o,$)):(o(),X=F(function(){X=null},$))},e.redraw.strategy=e.prop();var _=0;e.startComputation=function(){_++},e.endComputation=function(){_=Math.max(_-1,0),0===_&&e.redraw()};var ab=function(){"none"==e.redraw.strategy()?(_--,e.redraw.strategy("diff")):e.endComputation()};e.withAttr=function(a,b){return function(c){c=c||event;var d=c.currentTarget||this;b(a in d?d[a]:d.getAttribute(a))}};var bb,cb,db={pathname:"",hash:"#",search:"?"},eb=function(){};return e.route=function(){if(0===arguments.length)return cb;if(3===arguments.length&&L.call(arguments[1])===J){var a=arguments[0],c=arguments[1],d=arguments[2];eb=function(b){var f=cb=p(b);q(a,d,f)||e.route(c,!0)};var f="hash"===e.route.mode?"onhashchange":"onpopstate";b[f]=function(){cb!=p(E[e.route.mode])&&eb(E[e.route.mode])},Z=s,b[f]()}else if(arguments[0].addEventListener){{var g=arguments[0];arguments[1],arguments[2]}g.href=("pathname"!==e.route.mode?E.pathname:"")+db[e.route.mode]+this.attrs.href,g.removeEventListener("click",r),g.addEventListener("click",r)}else if(L.call(arguments[0])===J){cb=arguments[0];var h=arguments[1]||{},i=cb.indexOf("?"),j=i>-1?u(cb.slice(i+1)):{};for(var k in h)j[k]=h[k];var l=t(j),m=i>-1?cb.slice(0,i):cb;l&&(cb=m+(-1===m.indexOf("?")?"?":"&")+l);var n=(3===arguments.length?arguments[2]:arguments[1])===!0;b.history.pushState?(Z=function(){b.history[n?"replaceState":"pushState"](null,D.title,db[e.route.mode]+cb),s()},eb(db[e.route.mode]+cb)):E[e.route.mode]=cb}},e.route.param=function(a){if(!bb)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return bb[a]},e.route.mode="search",e.deferred=function(){var a=new y;return a.promise=x(a.promise),a},e.deferred.onerror=function(a){if("[object Error]"===L.call(a)&&!a.constructor.toString().match(/ Error/))throw a},e.sync=function(a){function b(a,b){return function(e){return g[a]=e,b||(c="reject"),0===--f&&(d.promise(g),d[c](g)),e}}var c="resolve",d=e.deferred(),f=a.length,g=new Array(f);if(a.length>0)for(var h=0;h0&&(f.attrs[e]=g.join(" "));var i=c?b[2]:b[1];f.children=K.call(i)===H?i:b.slice(c?2:1);for(var j in d)f.attrs[j]=j===e?(f.attrs[j]||"")+" "+d[j]:d[j];return f}function f(a,b,d,e,j,l,m,n,o,p,q){if((null==j||null==j.toString())&&(j=""),"retain"===j.subtree)return l;var r=K.call(l),s=K.call(j);if(null==l||r!==s){if(null!=l)if(d&&d.nodes){var t=n-e,u=t+(s===H?j:l.nodes).length;i(d.nodes.slice(t,u),d.slice(t,u))}else l.nodes&&i(l.nodes,l);l=new j.constructor,l.tag&&(l={}),l.nodes=[]}if(s===H){for(var v=0,w=j.length;w>v;v++)K.call(j[v])===H&&(j=j.concat.apply([],j),v--);for(var x=[],y=l.length===j.length,z=0,A=1,B=2,D=3,E={},F=[],L=!1,v=0;v-1&&(j=j.filter(function(a){return null!=a}));var M=!1;if(j.length!=l.length)M=!0;else for(var O,P,v=0;O=l[v],P=j[v];v++)if(O.attrs&&P.attrs&&O.attrs.key!=P.attrs.key){M=!0;break}if(M){for(var v=0,w=j.length;w>v;v++)if(j[v]&&j[v].attrs)if(null!=j[v].attrs.key){var Q=j[v].attrs.key;E[Q]=E[Q]?{action:D,index:v,from:E[Q].index,element:a.childNodes[E[Q].index]||C.createElement("div")}:{action:B,index:v}}else F.push({index:v,element:a.childNodes[v]||C.createElement("div")});var R=[];for(var S in E)R.push(E[S]);for(var T,U=R.sort(g),V=new Array(l.length),v=0;T=U[v];v++){if(T.action===A&&(i(l[T.index].nodes,l[T.index]),V.splice(T.index,1)),T.action===B){var W=C.createElement("div");W.key=j[T.index].attrs.key,a.insertBefore(W,a.childNodes[T.index]||null),V.splice(T.index,0,{attrs:{key:j[T.index].attrs.key},nodes:[W]})}T.action===D&&(a.childNodes[T.index]!==T.element&&null!==T.element&&a.insertBefore(T.element,a.childNodes[T.index]||null),V[T.index]=l[T.from])}for(var v=0,w=F.length;w>v;v++){var T=F[v];a.insertBefore(T.element,a.childNodes[T.index]||null),V[T.index]=l[T.index]}l=V,l.nodes=new Array(a.childNodes.length);for(var X,v=0;X=a.childNodes[v];v++)l.nodes[v]=X}}for(var v=0,Y=0,w=j.length;w>v;v++){var Z=f(a,b,l,n,j[v],l[Y],m,n+z||z,o,p,q);Z!==c&&(Z.nodes.intact||(y=!1),z+=Z.$trusted?(Z.match(/<[^\/]|\>\s*[^<]/g)||[]).length:K.call(Z)===H?Z.length:1,l[Y++]=Z)}if(!y){for(var v=0,w=j.length;w>v;v++)null!=l[v]&&x.push.apply(x,l[v].nodes);for(var $,v=0;$=l.nodes[v];v++)null!=$.parentNode&&x.indexOf($)<0&&i([$],[l[v]]);j.length("key"in j.attrs?1:0);if((j.tag!=l.tag||_.join()!=Object.keys(l.attrs).join()||j.attrs.id!=l.attrs.id)&&(l.nodes.length&&i(l.nodes),l.configContext&&typeof l.configContext.onunload===J&&l.configContext.onunload()),K.call(j.tag)!=I)return;var $,bb=0===l.nodes.length;if(j.attrs.xmlns?p=j.attrs.xmlns:"svg"===j.tag?p="http://www.w3.org/2000/svg":"math"===j.tag&&(p="http://www.w3.org/1998/Math/MathML"),bb?($=j.attrs.is?p===c?C.createElement(j.tag,j.attrs.is):C.createElementNS(p,j.tag,j.attrs.is):p===c?C.createElement(j.tag):C.createElementNS(p,j.tag),l={tag:j.tag,attrs:ab?h($,j.tag,j.attrs,{},p):j.attrs,children:null!=j.children&&j.children.length>0?f($,j.tag,c,c,j.children,l.children,!0,0,j.attrs.contenteditable?$:o,p,q):j.children,nodes:[$]},l.children&&!l.children.nodes&&(l.children.nodes=[]),"select"===j.tag&&j.attrs.value&&h($,j.tag,{value:j.attrs.value},{},p),a.insertBefore($,a.childNodes[n]||null)):($=l.nodes[0],ab&&h($,j.tag,j.attrs,l.attrs,p),l.children=f($,j.tag,c,c,j.children,l.children,!1,0,j.attrs.contenteditable?$:o,p,q),l.nodes.intact=!0,m===!0&&null!=$&&a.insertBefore($,a.childNodes[n]||null)),typeof j.attrs.config===J){var cb=l.configContext=l.configContext||{},db=function(a,b){return function(){return a.attrs.config.apply(a,b)}};q.push(db(j,[$,!bb,cb,l]))}}else if(typeof s!=J){var x;0===l.nodes.length?(j.$trusted?x=k(a,n,j):(x=[C.createTextNode(j)],a.nodeName.match(N)||a.insertBefore(x[0],a.childNodes[n]||null)),l="string number boolean".indexOf(typeof j)>-1?new j.constructor(j):j,l.nodes=x):l.valueOf()!==j.valueOf()||m===!0?(x=l.nodes,o&&o===C.activeElement||(j.$trusted?(i(x,l),x=k(a,n,j)):"textarea"===b?a.value=j:o?o.innerHTML=j:((1===x[0].nodeType||x.length>1)&&(i(l.nodes,l),x=[C.createTextNode(j)]),a.insertBefore(x[0],a.childNodes[n]||null),x[0].nodeValue=j)),l=new j.constructor(j),l.nodes=x):l.nodes.intact=!0}return l}function g(a,b){return a.action-b.action||a.index-b.index}function h(a,b,c,d,e){for(var f in c){var g=c[f],h=d[f];if(f in d&&h===g)"value"===f&&"input"===b&&a.value!=g&&(a.value=g);else{d[f]=g;try{if("config"===f||"key"==f)continue;if(typeof g===J&&0===f.indexOf("on"))a[f]=l(g,a);else if("style"===f&&null!=g&&K.call(g)===G){for(var i in g)(null==h||h[i]!==g[i])&&(a.style[i]=g[i]);for(var i in h)i in g||(a.style[i]="")}else null!=e?"href"===f?a.setAttributeNS("http://www.w3.org/1999/xlink","href",g):"className"===f?a.setAttribute("class",g):a.setAttribute(f,g):f in a&&"list"!==f&&"style"!==f&&"form"!==f&&"type"!==f?("input"!==b||a[f]!==g)&&(a[f]=g):a.setAttribute(f,g)}catch(j){if(j.message.indexOf("Invalid argument")<0)throw j}}}return d}function i(a,b){for(var c=a.length-1;c>-1;c--)if(a[c]&&a[c].parentNode){try{a[c].parentNode.removeChild(a[c])}catch(d){}b=[].concat(b),b[c]&&j(b[c])}0!=a.length&&(a.length=0)}function j(a){if(a.configContext&&typeof a.configContext.onunload===J&&a.configContext.onunload(),a.children)if(K.call(a.children)===H)for(var b,c=0;b=a.children[c];c++)j(b);else a.children.tag&&j(a.children)}function k(a,b,c){var d=a.childNodes[b];if(d){var e=1!=d.nodeType,f=C.createElement("span");e?(a.insertBefore(f,d||null),f.insertAdjacentHTML("beforebegin",c),a.removeChild(f)):d.insertAdjacentHTML("beforebegin",c)}else a.insertAdjacentHTML("beforeend",c);for(var g=[];a.childNodes[b]!==d;)g.push(a.childNodes[b]),b++;return g}function l(a,b){return function(c){c=c||event,e.redraw.strategy("diff"),e.startComputation();try{return a.call(b,c)}finally{_()}}}function m(a){var b=Q.indexOf(a);return 0>b?Q.push(a)-1:b}function n(a){var b=function(){return arguments.length&&(a=arguments[0]),a};return b.toJSON=function(){return a},b}function o(){for(var a,b="all"===e.redraw.strategy(),c=0;a=T[c];c++)V[c]&&e.render(a,U[c].view(V[c]),b);Y&&(Y(),Y=null),W=null,X=new Date,e.redraw.strategy("diff")}function p(a){return a.slice(cb[e.route.mode].length)}function q(a,b,c){ab={};var d=c.indexOf("?");-1!==d&&(ab=u(c.substr(d+1,c.length)),c=c.substr(0,d));for(var f in b){if(f===c)return e.module(a,b[f]),!0;var g=new RegExp("^"+f.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(g.test(c))return c.replace(g,function(){for(var c=f.match(/:[^\/]+/g)||[],d=[].slice.call(arguments,1,-2),g=0,h=c.length;h>g;g++)ab[c[g].replace(/:|\./g,"")]=decodeURIComponent(d[g]);e.module(a,b[f])}),!0}}function r(a){if(a=a||event,!a.ctrlKey&&!a.metaKey&&2!==a.which){a.preventDefault?a.preventDefault():a.returnValue=!1;var b=a.currentTarget||this,c="pathname"===e.route.mode&&b.search?u(b.search.slice(1)):{};e.route(b[e.route.mode].slice(cb[e.route.mode].length),c)}}function s(){"hash"!=e.route.mode&&D.hash?D.hash=D.hash:b.scrollTo(0,0)}function t(a,b){var c=[];for(var d in a){var e=b?b+"["+d+"]":d,f=a[d];c.push(null!=f&&K.call(f)===G?t(f,e):encodeURIComponent(e)+"="+encodeURIComponent(f))}return c.join("&")}function u(a){for(var b=a.split("&"),c={},d=0,e=b.length;e>d;d++){var f=b[d].split("=");c[decodeURIComponent(f[0])]=f[1]?decodeURIComponent(f[1]):""}return c}function v(a){var b=m(a);i(a.childNodes,R[b]),R[b]=c}function w(a){var b=e.prop();return a.then(b),b.then=function(b,c){return w(a.then(b,c))},b}function x(a,b){function c(a){l=a||j,n.map(function(a){l===i&&a.resolve(m)||a.reject(m)})}function d(a,b,c,d){if((null!=m&&K.call(m)===G||typeof m===J)&&typeof a===J)try{var f=0;a.call(m,function(a){f++||(m=a,b())},function(a){f++||(m=a,c())})}catch(g){e.deferred.onerror(g),m=g,c()}else d()}function f(){var j;try{j=m&&m.then}catch(n){return e.deferred.onerror(n),m=n,l=h,f()}d(j,function(){l=g,f()},function(){l=h,f()},function(){try{l===g&&typeof a===J?m=a(m):l===h&&"function"==typeof b&&(m=b(m),l=g)}catch(f){return e.deferred.onerror(f),m=f,c()}m===k?(m=TypeError(),c()):d(j,function(){c(i)},c,function(){c(l===g&&i)})})}var g=1,h=2,i=3,j=4,k=this,l=0,m=0,n=[];k.promise={},k.resolve=function(a){return l||(m=a,l=g,f()),this},k.reject=function(a){return l||(m=a,l=h,f()),this},k.promise.then=function(a,b){var c=new x(a,b);return l===i?c.resolve(m):l===j?c.reject(m):n.push(c),c.promise}}function y(a){return a}function z(a){if(!a.dataType||"jsonp"!==a.dataType.toLowerCase()){var d=new b.XMLHttpRequest;if(d.open(a.method,a.url,!0,a.user,a.password),d.onreadystatechange=function(){4===d.readyState&&(d.status>=200&&d.status<300?a.onload({type:"load",target:d}):a.onerror({type:"error",target:d}))},a.serialize===JSON.stringify&&a.data&&"GET"!==a.method&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),a.deserialize===JSON.parse&&d.setRequestHeader("Accept","application/json, text/*"),typeof a.config===J){var e=a.config(d,a);null!=e&&(d=e)}var f="GET"!==a.method&&a.data?a.data:"";if(f&&K.call(f)!=I&&f.constructor!=b.FormData)throw"Request data should be either be a string or FormData. Check the `serialize` option in `m.request`";return d.send(f),d}var g="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),h=C.createElement("script");b[g]=function(d){C.body.removeChild(h),a.onload({type:"load",target:{responseText:d}}),b[g]=c},h.onerror=function(){return C.body.removeChild(h),a.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),b[g]=c,!1},h.onload=function(){return!1},h.src=a.url+(a.url.indexOf("?")>0?"&":"?")+(a.callbackKey?a.callbackKey:"callback")+"="+g+"&"+t(a.data||{}),C.body.appendChild(h)}function A(a,b,c){if("GET"===a.method&&"jsonp"!=a.dataType){var d=a.url.indexOf("?")<0?"?":"&",e=t(b);a.url=a.url+(e?d+e:"")}else a.data=c(b);return a}function B(a,b){var c=a.match(/:[a-z]\w+/gi);if(c&&b)for(var d=0;dk;k++)e[k]()},e.trust=function(a){return a=new String(a),a.$trusted=!0,a},e.prop=function(a){return(null!=a&&K.call(a)===G||typeof a===J)&&typeof a.then===J?w(a):n(a)};var S,T=[],U=[],V=[],W=null,X=0,Y=null,Z=16;e.module=function(a,b){if(!a)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var c=T.indexOf(a);0>c&&(c=T.length);var d=!1;if(V[c]&&typeof V[c].onunload===J){var f={preventDefault:function(){d=!0}};V[c].onunload(f)}if(!d){e.redraw.strategy("all"),e.startComputation(),T[c]=a;var g=S=b,h=new b.controller;return g===S&&(V[c]=h,U[c]=b),_(),V[c]}},e.redraw=function(a){W&&a!==!0?(new Date-X>Z||E===b.requestAnimationFrame)&&(W>0&&F(W),W=E(o,Z)):(o(),W=E(function(){W=null},Z))},e.redraw.strategy=e.prop();var $=0;e.startComputation=function(){$++},e.endComputation=function(){$=Math.max($-1,0),0===$&&e.redraw()};var _=function(){"none"==e.redraw.strategy()?($--,e.redraw.strategy("diff")):e.endComputation()};e.withAttr=function(a,b){return function(c){c=c||event;var d=c.currentTarget||this;b(a in d?d[a]:d.getAttribute(a))}};var ab,bb,cb={pathname:"",hash:"#",search:"?"},db=function(){};return e.route=function(){if(0===arguments.length)return bb;if(3===arguments.length&&K.call(arguments[1])===I){var a=arguments[0],c=arguments[1],d=arguments[2];db=function(b){var f=bb=p(b);q(a,d,f)||e.route(c,!0)};var f="hash"===e.route.mode?"onhashchange":"onpopstate";b[f]=function(){bb!=p(D[e.route.mode])&&db(D[e.route.mode])},Y=s,b[f]()}else if(arguments[0].addEventListener){{var g=arguments[0];arguments[1],arguments[2]}g.href=("pathname"!==e.route.mode?D.pathname:"")+cb[e.route.mode]+this.attrs.href,g.removeEventListener("click",r),g.addEventListener("click",r)}else if(K.call(arguments[0])===I){bb=arguments[0];var h=arguments[1]||{},i=bb.indexOf("?"),j=i>-1?u(bb.slice(i+1)):{};for(var k in h)j[k]=h[k];var l=t(j),m=i>-1?bb.slice(0,i):bb;l&&(bb=m+(-1===m.indexOf("?")?"?":"&")+l);var n=(3===arguments.length?arguments[2]:arguments[1])===!0;b.history.pushState?(Y=function(){b.history[n?"replaceState":"pushState"](null,C.title,cb[e.route.mode]+bb),s()},db(cb[e.route.mode]+bb)):D[e.route.mode]=bb}},e.route.param=function(a){if(!ab)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return ab[a]},e.route.mode="search",e.deferred=function(){var a=new x;return a.promise=w(a.promise),a},e.deferred.onerror=function(a){if("[object Error]"===K.call(a)&&!a.constructor.toString().match(/ Error/))throw a},e.sync=function(a){function b(a,b){return function(e){return g[a]=e,b||(c="reject"),0===--f&&(d.promise(g),d[c](g)),e}}var c="resolve",d=e.deferred(),f=a.length,g=new Array(f);if(a.length>0)for(var h=0;hV>7?4c>;vxHCJgam^Hn?iqQhXT4Tis LQ8)dK6{8&h)wddw delta 75 zcmZ4Wjb+t07QO&)W)?065GY?Z-*qG3UmF$>V>7?4c>;vxHCJgam^Hn?iqQhXT4Tis LQ8)dK6{8&h<{}$3 diff --git a/archive/v0.1.28/mithril.module.html b/archive/v0.1.28/mithril.module.html index a2e6a923..9b5fe49c 100644 --- a/archive/v0.1.28/mithril.module.html +++ b/archive/v0.1.28/mithril.module.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.module - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.module


      @@ -192,18 +192,18 @@ where:

      An instance of the controller constructor

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.prop.html b/archive/v0.1.28/mithril.prop.html index 492ee952..b8b7b85d 100644 --- a/archive/v0.1.28/mithril.prop.html +++ b/archive/v0.1.28/mithril.prop.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.prop - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.prop


      @@ -181,18 +181,18 @@ where:
    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.redraw.html b/archive/v0.1.28/mithril.redraw.html index f03ba455..d3cbc7e5 100644 --- a/archive/v0.1.28/mithril.redraw.html +++ b/archive/v0.1.28/mithril.redraw.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.redraw - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.redraw


      @@ -215,18 +215,18 @@ where:

      Calling this function without arguments returns the currently assigned redraw strategy.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.render.html b/archive/v0.1.28/mithril.render.html index bd91688f..7cc86cd5 100644 --- a/archive/v0.1.28/mithril.render.html +++ b/archive/v0.1.28/mithril.render.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.render - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.render


      @@ -170,18 +170,18 @@ where:

      If set to true, rendering a new virtual tree will completely overwrite an existing one without attempting to diff against it

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.request.html b/archive/v0.1.28/mithril.request.html index 6c07efee..cd9ca8fd 100644 --- a/archive/v0.1.28/mithril.request.html +++ b/archive/v0.1.28/mithril.request.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.request - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.request


      @@ -423,9 +423,6 @@ where:
    • String password (optional)

      A password for HTTP authentication. Defaults to undefined

    • -
    • String password (optional)

      -

      A password for HTTP authentication. Defaults to undefined

      -
    • Object data (optional)

      Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on method

    • @@ -559,18 +556,18 @@ demo.view = function(ctrl) {
    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.route.html b/archive/v0.1.28/mithril.route.html index a9d91669..b2b3f981 100644 --- a/archive/v0.1.28/mithril.route.html +++ b/archive/v0.1.28/mithril.route.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.route - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.route


      @@ -323,18 +323,18 @@ m("a[href='/dashboard/alicesmith']", {config: m.route});

      the method does not run if this flag is set to true. This is to make the method compatible with virtual DOM elements' config attribute (see m())

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.sync.html b/archive/v0.1.28/mithril.sync.html index f3b48f9d..1f8746fe 100644 --- a/archive/v0.1.28/mithril.sync.html +++ b/archive/v0.1.28/mithril.sync.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.sync - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.sync

    This method takes a list of promises and returns a promise that resolves when all promises in the input list have resolved. See m.deferred for more information on promises.


    @@ -112,18 +112,18 @@ where:

    The callbacks for this promise receive as a parameter an Array containing the values of all the input promises

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.trust.html b/archive/v0.1.28/mithril.trust.html index f1c9aa96..c0c5c539 100644 --- a/archive/v0.1.28/mithril.trust.html +++ b/archive/v0.1.28/mithril.trust.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.trust - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.trust

    If you're writing a template for a view, use m() instead.

    This method flags a string as trusted HTML.

    @@ -122,18 +122,18 @@ m.render("body", [

    Also note that concatenating or splitting a trusted string removes the trust flag. If doing such operations, the final string needs to be flagged as trusted.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.withAttr.html b/archive/v0.1.28/mithril.withAttr.html index b1f1f939..75d223c0 100644 --- a/archive/v0.1.28/mithril.withAttr.html +++ b/archive/v0.1.28/mithril.withAttr.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + m.withAttr - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    m.withAttr

    This is an event handler factory. It returns a method that can be bound to a DOM element's event listener.

    Typically, it's used in conjunction with m.prop to implement data binding in the view-to-model direction.

    @@ -127,18 +127,18 @@ where:

    This handler method can be assigned to properties like onclick, or passed as callbacks to addEventListener.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/mithril.xhr.html b/archive/v0.1.28/mithril.xhr.html index 6ea4012f..55fa4905 100644 --- a/archive/v0.1.28/mithril.xhr.html +++ b/archive/v0.1.28/mithril.xhr.html @@ -89,4 +89,4 @@ - \ No newline at end of file + diff --git a/archive/v0.1.28/optimizing-performance.html b/archive/v0.1.28/optimizing-performance.html index 6a2f57ee..64cf3376 100644 --- a/archive/v0.1.28/optimizing-performance.html +++ b/archive/v0.1.28/optimizing-performance.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Optimizing Performance - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Optimizing Performance

    There's a number of ways to improve Mithril performance for the rare cases where pages are too complex for their own good.

    First and foremost, you should think hard about whether performance optimization is truly your last resort. By nature, optimizing performance make aggressive assumptions that can break in edge cases and it yields difficult to understand code. As a rule of thumb, you should never implement performance optimizations if another solution is available.

    @@ -105,18 +105,18 @@

    To run the automation task, run the following command from the root folder of your project:

    grunt
     

    More documentation on the grunt-sweet.js task and its options can be found here

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/practices.html b/archive/v0.1.28/practices.html index 80fcc972..47ded878 100644 --- a/archive/v0.1.28/practices.html +++ b/archive/v0.1.28/practices.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + How Should Code Be Organized - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    How Should Code Be Organized

    While Mithril doesn't dictate how to organize your code, it does provide some recommendations for structuring it.

    As a rule of thumb, controllers should not change model entity properties on an individual basis.

    @@ -101,18 +101,18 @@ app.view = function() {

    Usage of keys

    If you need to sort lists, or delete items from them, or splice them in any way, you should use the key attribute to maintain referential integrity between the data and the DOM.

    Not using keys still works in some cases, but might trigger more expensive code paths within the redrawing algorithm.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/refactoring.html b/archive/v0.1.28/refactoring.html index c0d0a958..8113a164 100644 --- a/archive/v0.1.28/refactoring.html +++ b/archive/v0.1.28/refactoring.html @@ -59,4 +59,4 @@ - \ No newline at end of file + diff --git a/archive/v0.1.28/roadmap.html b/archive/v0.1.28/roadmap.html index 1449323f..4280d169 100644 --- a/archive/v0.1.28/roadmap.html +++ b/archive/v0.1.28/roadmap.html @@ -1,80 +1,80 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    -
    -

    API (v0.1.28)

    -

    Core

    - -

    Routing

    - -

    Data

    - -

    HTML

    - -

    Rendering

    - -

    Testing

    - - -

    History

    - -
    -
    + + + + Roadmap - Mithril + + + + +
    + +
    +
    +
    +
    +
    +
    +

    API (v0.1.28)

    +

    Core

    + +

    Routing

    + +

    Data

    + +

    HTML

    + +

    Rendering

    + +

    Testing

    + + +

    History

    + +
    +

    Roadmap

    Things that would be useful to have (though likely not as part of Mithril core)

    Utilities

    @@ -102,18 +102,18 @@
  • Swipe-to-show panel
  • Tree
  • - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/routing.html b/archive/v0.1.28/routing.html index 4889f1c3..0c82ec77 100644 --- a/archive/v0.1.28/routing.html +++ b/archive/v0.1.28/routing.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Routing - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Routing

    Routing is a system that allows creating Single-Page-Applications (SPA), i.e. applications that can go from one page to another without causing a full browser refresh.

    It enables seamless navigability while preserving the ability to bookmark each page individually, and the ability to navigate the application via the browser's history mechanism.

    @@ -117,18 +117,18 @@ m("a[href='/dashboard/alicesmith']", {config: m.route});

    This makes the href behave correctly regardless of which m.route.mode is selected. It's a good practice to always use the idiom above, instead of hardcoding ? or # in the href attribute.

    See m() for more information on virtual elements.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/tools.html b/archive/v0.1.28/tools.html index d599b0d5..1b91de4e 100644 --- a/archive/v0.1.28/tools.html +++ b/archive/v0.1.28/tools.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Tools - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Tools

    HTML-to-Mithril Template Converter

    If you already have your HTML written and want to convert it into a Mithril template, you can use the tool below for one-off manual conversion.

    @@ -94,18 +94,18 @@

    Mithril also has a dependency on XMLHttpRequest. If you wish to support IE6, you'll need a shim for it. IE7 and lower do not support cross-domain AJAX requests.

    In addition, note that most m.route modes rely on history.pushState in order to allow moving from one page to another without a browser refresh. IE9 and lower do not support this feature and will gracefully degrade to page refreshes instead.

    - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + + diff --git a/archive/v0.1.28/web-services.html b/archive/v0.1.28/web-services.html index a3a1b2e1..d6bc07b8 100644 --- a/archive/v0.1.28/web-services.html +++ b/archive/v0.1.28/web-services.html @@ -1,50 +1,50 @@ - - - - Mithril - - - - -
    - -
    -
    -
    -
    -
    - -
    + + + + Web Services - Mithril + + + + +
    + +
    +
    +
    +
    +
    + +

    Web Services

    Mithril provides a high-level utility for working with web services, which allows writing asynchronous code relatively procedurally.

    It provides a number of useful features out of the box:

    @@ -214,18 +214,18 @@ var users = User.list(); deserialize: function(value) {return value;} }); - -
    -
    -
    -
    -
    -
    -
    - Released under the MIT license -
    © 2014 Leo Horie -
    -
    - - - \ No newline at end of file + +
    +
    +
    +
    +
    +
    +
    + Released under the MIT license +
    © 2014 Leo Horie +
    +
    + + +