push layout
This commit is contained in:
parent
fbb25f05ae
commit
4deeeb486b
37 changed files with 2289 additions and 2298 deletions
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>The Auto-Redrawing System
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="the-auto-redrawing-system">The Auto-Redrawing System</h2>
|
<h2 id="the-auto-redrawing-system">The Auto-Redrawing System</h2>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -135,18 +135,18 @@ var doBoth = function(callback) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Benchmarks
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="benchmarks">Benchmarks</h2>
|
<h2 id="benchmarks">Benchmarks</h2>
|
||||||
<p>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 <a href="http://blog.kissmetrics.com/loading-time/">one of the most important metrics when it comes to performance</a>.</p>
|
<p>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 <a href="http://blog.kissmetrics.com/loading-time/">one of the most important metrics when it comes to performance</a>.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -81,18 +81,18 @@
|
||||||
<p>There's a TodoMVC benchmark with a variety of popular and obscure frameworks here:</p>
|
<p>There's a TodoMVC benchmark with a variety of popular and obscure frameworks here:</p>
|
||||||
<p><a href="http://matt-esch.github.io/mercury-perf/">http://matt-esch.github.io/mercury-perf/</a></p>
|
<p><a href="http://matt-esch.github.io/mercury-perf/">http://matt-esch.github.io/mercury-perf/</a></p>
|
||||||
<p>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).</p>
|
<p>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).</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Change Log
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="change-log">Change Log</h2>
|
<h2 id="change-log">Change Log</h2>
|
||||||
<p><a href="/mithril/archive/v0.1.28">v0.1.28</a> - maintenance</p>
|
<p><a href="/mithril/archive/v0.1.28">v0.1.28</a> - maintenance</p>
|
||||||
<h3 id="news-">News:</h3>
|
<h3 id="news-">News:</h3>
|
||||||
|
|
@ -429,18 +429,18 @@ m.request({method: "GET", url: "http://foo.com/api", config:
|
||||||
</ul>
|
</ul>
|
||||||
<hr>
|
<hr>
|
||||||
<p><a href="/mithril/archive/v0.1">v0.1</a> - Initial release</p>
|
<p><a href="/mithril/archive/v0.1">v0.1</a> - Initial release</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Community
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="community">Community</h2>
|
<h2 id="community">Community</h2>
|
||||||
<h3 id="learn-mithril">Learn Mithril</h3>
|
<h3 id="learn-mithril">Learn Mithril</h3>
|
||||||
<p>Read Mithril tutorials and articles about web app development.</p>
|
<p>Read Mithril tutorials and articles about web app development.</p>
|
||||||
|
|
@ -67,18 +67,18 @@
|
||||||
<hr>
|
<hr>
|
||||||
<h3 id="bug-tracker">Bug Tracker</h3>
|
<h3 id="bug-tracker">Bug Tracker</h3>
|
||||||
<p>You can file bugs in the <a href="https://github.com/lhorie/mithril.js/issues?state=open">issues page on Github</a></p>
|
<p>You can file bugs in the <a href="https://github.com/lhorie/mithril.js/issues?state=open">issues page on Github</a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>How is Mithril Different from Other Frameworks
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="how-is-mithril-different-from-other-frameworks">How is Mithril Different from Other Frameworks</h2>
|
<h2 id="how-is-mithril-different-from-other-frameworks">How is Mithril Different from Other Frameworks</h2>
|
||||||
<p>There are a lot of different Javascript frameworks and evaluating their merits and shortcomings can be a daunting task.</p>
|
<p>There are a lot of different Javascript frameworks and evaluating their merits and shortcomings can be a daunting task.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -113,18 +113,18 @@
|
||||||
<p>The most relevant difference is that Vue uses <a href="https://github.com/yyx990803/vue/wiki/FAQ">browser features that don't work (and cannot be made to work) in Internet Explorer 8 and lower</a>. 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.</p>
|
<p>The most relevant difference is that Vue uses <a href="https://github.com/yyx990803/vue/wiki/FAQ">browser features that don't work (and cannot be made to work) in Internet Explorer 8 and lower</a>. 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.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
<p>In contrast, Mithril avoids "magic" types.</p>
|
<p>In contrast, Mithril avoids "magic" types.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Components
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="components">Components</h2>
|
<h2 id="components">Components</h2>
|
||||||
<h3 id="widgetization">Widgetization</h3>
|
<h3 id="widgetization">Widgetization</h3>
|
||||||
<p>Components are Mithril's mechanism for <a href="http://en.wikipedia.org/wiki/Hierarchical_model%E2%80%93view%E2%80%93controller">hierarchical MVC</a>.</p>
|
<p>Components are Mithril's mechanism for <a href="http://en.wikipedia.org/wiki/Hierarchical_model%E2%80%93view%E2%80%93controller">hierarchical MVC</a>.</p>
|
||||||
|
|
@ -235,18 +235,18 @@ dashboard.view = function() {
|
||||||
m.module(document.body, dashboard);
|
m.module(document.body, dashboard);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>In the usage example above, we created a <code>dashboard</code> top-level module, and instantiated two <code>autocompleter</code> modules, along with some data to populate the autocompleter, and getter-setters to bind data to.</p>
|
<p>In the usage example above, we created a <code>dashboard</code> top-level module, and instantiated two <code>autocompleter</code> modules, along with some data to populate the autocompleter, and getter-setters to bind data to.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Getting Started
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="getting-started">Getting Started</h2>
|
<h2 id="getting-started">Getting Started</h2>
|
||||||
<h3 id="what-is-mithril-">What is Mithril?</h3>
|
<h3 id="what-is-mithril-">What is Mithril?</h3>
|
||||||
<p>Mithril is a client-side Javascript MVC framework, i.e. it's a tool to make application code divided into a data layer (called <strong>M</strong>odel), a UI layer (called <strong>V</strong>iew), and a glue layer (called <strong>C</strong>ontroller)</p>
|
<p>Mithril is a client-side Javascript MVC framework, i.e. it's a tool to make application code divided into a data layer (called <strong>M</strong>odel), a UI layer (called <strong>V</strong>iew), and a glue layer (called <strong>C</strong>ontroller)</p>
|
||||||
|
|
@ -490,18 +490,18 @@ this.description(data.description)
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>How to Read Signatures
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="how-to-read-signatures">How to Read Signatures</h2>
|
<h2 id="how-to-read-signatures">How to Read Signatures</h2>
|
||||||
<p>Rather than providing concrete classes like other frameworks, Mithril provides methods that operate on plain old Javascript objects (POJOs) that match given signatures.</p>
|
<p>Rather than providing concrete classes like other frameworks, Mithril provides methods that operate on plain old Javascript objects (POJOs) that match given signatures.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -189,18 +189,18 @@ test({ first: "first", config: function(element) { /*do stuff*/ } })
|
||||||
<p>And we also define it as a list of arguments (note that lack of square brackets)</p>
|
<p>And we also define it as a list of arguments (note that lack of square brackets)</p>
|
||||||
<pre><code class="lang-javascript">m("div", {title: "foo"}, "child 1", "child 2", "child 3")
|
<pre><code class="lang-javascript">m("div", {title: "foo"}, "child 1", "child 2", "child 3")
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title><%= topic %>Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Installation
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="installation">Installation</h2>
|
<h2 id="installation">Installation</h2>
|
||||||
<p>Mithril is available from a variety of sources:</p>
|
<p>Mithril is available from a variety of sources:</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
@ -105,18 +105,18 @@
|
||||||
<p>Note that Mithril uses the <code>next</code> branch as the stable branch, instead of <code>master</code>, because contributors usually use <code>master</code> for pull requests. Therefore, the <code>master</code> branch should be considered unstable, and should not be used.</p>
|
<p>Note that Mithril uses the <code>next</code> branch as the stable branch, instead of <code>master</code>, because contributors usually use <code>master</code> for pull requests. Therefore, the <code>master</code> branch should be considered unstable, and should not be used.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
<p>In order to update a forked version of Mithril, <a href="https://help.github.com/articles/syncing-a-fork">follow the instructions on this page</a>.</p>
|
<p>In order to update a forked version of Mithril, <a href="https://help.github.com/articles/syncing-a-fork">follow the instructions on this page</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Integrating with Other Libraries
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="integrating-with-other-libraries">Integrating with Other Libraries</h2>
|
<h2 id="integrating-with-other-libraries">Integrating with Other Libraries</h2>
|
||||||
<p>Integration with third party libraries or vanilla javascript code can be achieved via the <a href="mithril.html#accessing-the-real-dom"><code>config</code> attribute of virtual elements</a>.</p>
|
<p>Integration with third party libraries or vanilla javascript code can be achieved via the <a href="mithril.html#accessing-the-real-dom"><code>config</code> attribute of virtual elements</a>.</p>
|
||||||
<p>It's recommended that you encapsulate integration code in a component or a helper function.</p>
|
<p>It's recommended that you encapsulate integration code in a component or a helper function.</p>
|
||||||
|
|
@ -145,18 +145,18 @@ m.module(document.getElementById("widget2-container"), widget1)
|
||||||
|
|
||||||
m.endComputation()
|
m.endComputation()
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ var m = (function app(window, undefined) {
|
||||||
initialize(window);
|
initialize(window);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* @typedef {String} Tag
|
* @typedef {String} Tag
|
||||||
* A string that looks like -> div.classname#id[param=one][param2=two]
|
* A string that looks like -> div.classname#id[param=one][param2=two]
|
||||||
* Which describes a DOM node
|
* Which describes a DOM node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*
|
*
|
||||||
* @param {Tag} The DOM node tag
|
* @param {Tag} The DOM node tag
|
||||||
* @param {Object=[]} optional key-value pairs to be mapped to DOM attrs
|
* @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 = {};
|
var pairs = str.split("&"), params = {};
|
||||||
for (var i = 0, len = pairs.length; i < len; i++) {
|
for (var i = 0, len = pairs.length; i < len; i++) {
|
||||||
var pair = pairs[i].split("=");
|
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
|
return params
|
||||||
}
|
}
|
||||||
function decodeSpace(string) {
|
|
||||||
return decodeURIComponent(string.replace(/\+/g, " "))
|
|
||||||
}
|
|
||||||
function reset(root) {
|
function reset(root) {
|
||||||
var cacheKey = getCellCacheKey(root);
|
var cacheKey = getCellCacheKey(root);
|
||||||
clear(root.childNodes, cellCache[cacheKey]);
|
clear(root.childNodes, cellCache[cacheKey]);
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.startComputation / m.endComputation
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-startcomputation-m-endcomputation">m.startComputation / m.endComputation</h2>
|
<h2 id="m-startcomputation-m-endcomputation">m.startComputation / m.endComputation</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -261,18 +261,18 @@ m.endComputation()
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<pre><code class="lang-clike">void endComputation()
|
<pre><code class="lang-clike">void endComputation()
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.deferred
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-deferred">m.deferred</h2>
|
<h2 id="m-deferred">m.deferred</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -259,18 +259,18 @@ where:
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.deps
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-deps">m.deps</h2>
|
<h2 id="m-deps">m.deps</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -120,18 +120,18 @@ where:
|
||||||
<p>The returned window is the same as what is passed in.</p>
|
<p>The returned window is the same as what is passed in.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m">m</h2>
|
<h2 id="m">m</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -478,18 +478,18 @@ m.render(document, m("a")); //logs `unloaded the div` and `alert` neve
|
||||||
<p>The returned VirtualElement is a Javascript data structure that represents the DOM element to be rendered by <a href="mithril.render.html"><code>m.render</code></a></p>
|
<p>The returned VirtualElement is a Javascript data structure that represents the DOM element to be rendered by <a href="mithril.render.html"><code>m.render</code></a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ var m = (function app(window, undefined) {
|
||||||
initialize(window);
|
initialize(window);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* @typedef {String} Tag
|
* @typedef {String} Tag
|
||||||
* A string that looks like -> div.classname#id[param=one][param2=two]
|
* A string that looks like -> div.classname#id[param=one][param2=two]
|
||||||
* Which describes a DOM node
|
* Which describes a DOM node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*
|
*
|
||||||
* @param {Tag} The DOM node tag
|
* @param {Tag} The DOM node tag
|
||||||
* @param {Object=[]} optional key-value pairs to be mapped to DOM attrs
|
* @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 = {};
|
var pairs = str.split("&"), params = {};
|
||||||
for (var i = 0, len = pairs.length; i < len; i++) {
|
for (var i = 0, len = pairs.length; i < len; i++) {
|
||||||
var pair = pairs[i].split("=");
|
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
|
return params
|
||||||
}
|
}
|
||||||
function decodeSpace(string) {
|
|
||||||
return decodeURIComponent(string.replace(/\+/g, " "))
|
|
||||||
}
|
|
||||||
function reset(root) {
|
function reset(root) {
|
||||||
var cacheKey = getCellCacheKey(root);
|
var cacheKey = getCellCacheKey(root);
|
||||||
clear(root.childNodes, cellCache[cacheKey]);
|
clear(root.childNodes, cellCache[cacheKey]);
|
||||||
|
|
|
||||||
2
archive/v0.1.28/mithril.min.js
vendored
2
archive/v0.1.28/mithril.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.module
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-module">m.module</h2>
|
<h2 id="m-module">m.module</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -192,18 +192,18 @@ where:
|
||||||
<p>An instance of the controller constructor</p>
|
<p>An instance of the controller constructor</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.prop
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-prop">m.prop</h2>
|
<h2 id="m-prop">m.prop</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -181,18 +181,18 @@ where:
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.redraw
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-redraw">m.redraw</h2>
|
<h2 id="m-redraw">m.redraw</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -215,18 +215,18 @@ where:
|
||||||
<p>Calling this function without arguments returns the currently assigned redraw strategy.</p>
|
<p>Calling this function without arguments returns the currently assigned redraw strategy.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.render
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-render">m.render</h2>
|
<h2 id="m-render">m.render</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -170,18 +170,18 @@ where:
|
||||||
<p>If set to true, rendering a new virtual tree will completely overwrite an existing one without attempting to diff against it</p>
|
<p>If set to true, rendering a new virtual tree will completely overwrite an existing one without attempting to diff against it</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.request
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-request">m.request</h2>
|
<h2 id="m-request">m.request</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -423,9 +423,6 @@ where:
|
||||||
<li><p><strong>String password</strong> (optional)</p>
|
<li><p><strong>String password</strong> (optional)</p>
|
||||||
<p>A password for HTTP authentication. Defaults to <code>undefined</code></p>
|
<p>A password for HTTP authentication. Defaults to <code>undefined</code></p>
|
||||||
</li>
|
</li>
|
||||||
<li><p><strong>String password</strong> (optional)</p>
|
|
||||||
<p>A password for HTTP authentication. Defaults to <code>undefined</code></p>
|
|
||||||
</li>
|
|
||||||
<li><p><strong>Object<any> data</strong> (optional)</p>
|
<li><p><strong>Object<any> data</strong> (optional)</p>
|
||||||
<p>Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on <code>method</code></p>
|
<p>Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on <code>method</code></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -559,18 +556,18 @@ demo.view = function(ctrl) {
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.route
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-route">m.route</h2>
|
<h2 id="m-route">m.route</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -323,18 +323,18 @@ m("a[href='/dashboard/alicesmith']", {config: m.route});
|
||||||
<p>the method does not run if this flag is set to true. This is to make the method compatible with virtual DOM elements' <code>config</code> attribute (see <a href="mithril"><code>m()</code></a>)</p>
|
<p>the method does not run if this flag is set to true. This is to make the method compatible with virtual DOM elements' <code>config</code> attribute (see <a href="mithril"><code>m()</code></a>)</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.sync
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-sync">m.sync</h2>
|
<h2 id="m-sync">m.sync</h2>
|
||||||
<p>This method takes a list of promises and returns a promise that resolves when all promises in the input list have resolved. See <a href="mithril.deferred.html"><code>m.deferred</code></a> for more information on promises.</p>
|
<p>This method takes a list of promises and returns a promise that resolves when all promises in the input list have resolved. See <a href="mithril.deferred.html"><code>m.deferred</code></a> for more information on promises.</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
@ -112,18 +112,18 @@ where:
|
||||||
<p>The callbacks for this promise receive as a parameter an Array containing the values of all the input promises</p>
|
<p>The callbacks for this promise receive as a parameter an Array containing the values of all the input promises</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.trust
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-trust">m.trust</h2>
|
<h2 id="m-trust">m.trust</h2>
|
||||||
<p>If you're writing a template for a view, use <code>m()</code> instead.</p>
|
<p>If you're writing a template for a view, use <code>m()</code> instead.</p>
|
||||||
<p>This method flags a string as trusted HTML.</p>
|
<p>This method flags a string as trusted HTML.</p>
|
||||||
|
|
@ -122,18 +122,18 @@ m.render("body", [
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>m.withAttr
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="m-withattr">m.withAttr</h2>
|
<h2 id="m-withattr">m.withAttr</h2>
|
||||||
<p>This is an event handler factory. It returns a method that can be bound to a DOM element's event listener.</p>
|
<p>This is an event handler factory. It returns a method that can be bound to a DOM element's event listener.</p>
|
||||||
<p>Typically, it's used in conjunction with <a href="mithril.prop.html"><code>m.prop</code></a> to implement data binding in the view-to-model direction.</p>
|
<p>Typically, it's used in conjunction with <a href="mithril.prop.html"><code>m.prop</code></a> to implement data binding in the view-to-model direction.</p>
|
||||||
|
|
@ -127,18 +127,18 @@ where:
|
||||||
<p>This handler method can be assigned to properties like <code>onclick</code>, or passed as callbacks to <code>addEventListener</code>.</p>
|
<p>This handler method can be assigned to properties like <code>onclick</code>, or passed as callbacks to <code>addEventListener</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,4 @@
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Optimizing Performance
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="optimizing-performance">Optimizing Performance</h2>
|
<h2 id="optimizing-performance">Optimizing Performance</h2>
|
||||||
<p>There's a number of ways to improve Mithril performance for the rare cases where pages are too complex for their own good.</p>
|
<p>There's a number of ways to improve Mithril performance for the rare cases where pages are too complex for their own good.</p>
|
||||||
<p>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 <em>never</em> implement performance optimizations if another solution is available.</p>
|
<p>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 <em>never</em> implement performance optimizations if another solution is available.</p>
|
||||||
|
|
@ -105,18 +105,18 @@
|
||||||
<p>To run the automation task, run the following command from the root folder of your project:</p>
|
<p>To run the automation task, run the following command from the root folder of your project:</p>
|
||||||
<pre><code>grunt
|
<pre><code>grunt
|
||||||
</code></pre><p>More documentation on the grunt-sweet.js task and its options <a href="https://github.com/natefaubion/grunt-sweet.js">can be found here</a></p>
|
</code></pre><p>More documentation on the grunt-sweet.js task and its options <a href="https://github.com/natefaubion/grunt-sweet.js">can be found here</a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>How Should Code Be Organized
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="how-should-code-be-organized">How Should Code Be Organized</h2>
|
<h2 id="how-should-code-be-organized">How Should Code Be Organized</h2>
|
||||||
<p>While Mithril doesn't dictate how to organize your code, it does provide some recommendations for structuring it.</p>
|
<p>While Mithril doesn't dictate how to organize your code, it does provide some recommendations for structuring it.</p>
|
||||||
<p>As a rule of thumb, controllers should not change model entity properties on an individual basis.</p>
|
<p>As a rule of thumb, controllers should not change model entity properties on an individual basis.</p>
|
||||||
|
|
@ -101,18 +101,18 @@ app.view = function() {
|
||||||
<h2 id="usage-of-keys">Usage of keys</h2>
|
<h2 id="usage-of-keys">Usage of keys</h2>
|
||||||
<p>If you need to sort lists, or delete items from them, or splice them in any way, you should <a href="mithril.html#dealing-with-sorting-and-deleting-in-lists">use the <code>key</code> attribute</a> to maintain referential integrity between the data and the DOM.</p>
|
<p>If you need to sort lists, or delete items from them, or splice them in any way, you should <a href="mithril.html#dealing-with-sorting-and-deleting-in-lists">use the <code>key</code> attribute</a> to maintain referential integrity between the data and the DOM.</p>
|
||||||
<p>Not using keys still works in some cases, but might trigger more expensive code paths within the redrawing algorithm.</p>
|
<p>Not using keys still works in some cases, but might trigger more expensive code paths within the redrawing algorithm.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,4 @@
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,80 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Roadmap
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="api">API (v0.1.28)</h2>
|
<h2 id="api">API (v0.1.28)</h2>
|
||||||
<h3 id="core">Core</h3>
|
<h3 id="core">Core</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
<li><a href="mithril.html" title="A utility to create virtual elements">m</a></li>
|
||||||
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
<li><a href="mithril.module.html" title="Initializes a controller/view pair">m.module</a></li>
|
||||||
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
<li><a href="mithril.prop.html" title="A getter-setter utility">m.prop</a></li>
|
||||||
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
<li><a href="mithril.withAttr.html" title="A event handler factory utility">m.withAttr</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="routing">Routing</h3>
|
<h3 id="routing">Routing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
<li><a href="mithril.route.html" title="A routing utility">m.route</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
<li><a href="mithril.route.html#defining-routes" title="Defines what routes exist">m.route(rootElement, defaultRoute, routes)</a></li>
|
||||||
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
<li><a href="mithril.route.html#redirecting" title="Redirects to a route">m.route(path, params)</a></li>
|
||||||
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
<li><a href="mithril.route.html#reading-current-route" title="Read the current route">m.route()</a></li>
|
||||||
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
|
||||||
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
|
||||||
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Data</h3>
|
<h3 id="data">Data</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
<li><a href="mithril.request.html" title="A high-level AJAX utility">m.request</a></li>
|
||||||
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
<li><a href="mithril.deferred.html" title="A Promise factory">m.deferred</a></li>
|
||||||
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
<li><a href="mithril.sync.html" title="A Promise aggregator">m.sync</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="html">HTML</h3>
|
<h3 id="html">HTML</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
<li><a href="mithril.trust.html" title="A method to unescape HTML">m.trust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="rendering">Rendering</h3>
|
<h3 id="rendering">Rendering</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
<li><a href="mithril.render.html" title="The lowest level rendering method">m.render</a></li>
|
||||||
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
<li><a href="mithril.redraw.html" title="A high-level explicit rendering method">m.redraw</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
<li><a href="mithril.redraw.html#strategy" title="A flag that drives the rendering strategy for the next redraw">m.redraw.strategy(strategy)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
<li><a href="mithril.computation.html" title="Utilities to integrate asynchronous contexts to the rendering system">m.startComputation / m.endComputation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="data">Testing</h3>
|
<h3 id="data">Testing</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
<li><a href="mithril.deps.html" title="The dependency injector">m.deps</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2 id="archive">History</h2>
|
<h2 id="archive">History</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="roadmap.html">Roadmap</a></li>
|
<li><a href="roadmap.html">Roadmap</a></li>
|
||||||
<li><a href="change-log.html">Change log</a></li>
|
<li><a href="change-log.html">Change log</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="roadmap">Roadmap</h2>
|
<h2 id="roadmap">Roadmap</h2>
|
||||||
<p>Things that would be useful to have (though likely not as part of Mithril core)</p>
|
<p>Things that would be useful to have (though likely not as part of Mithril core)</p>
|
||||||
<h3 id="utilities">Utilities</h3>
|
<h3 id="utilities">Utilities</h3>
|
||||||
|
|
@ -102,18 +102,18 @@
|
||||||
<li>Swipe-to-show panel</li>
|
<li>Swipe-to-show panel</li>
|
||||||
<li>Tree</li>
|
<li>Tree</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Routing
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="routing">Routing</h2>
|
<h2 id="routing">Routing</h2>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -117,18 +117,18 @@ m("a[href='/dashboard/alicesmith']", {config: m.route});
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>This makes the href behave correctly regardless of which <code>m.route.mode</code> is selected. It's a good practice to always use the idiom above, instead of hardcoding <code>?</code> or <code>#</code> in the href attribute.</p>
|
<p>This makes the href behave correctly regardless of which <code>m.route.mode</code> is selected. It's a good practice to always use the idiom above, instead of hardcoding <code>?</code> or <code>#</code> in the href attribute.</p>
|
||||||
<p>See <a href="mithril.html"><code>m()</code></a> for more information on virtual elements.</p>
|
<p>See <a href="mithril.html"><code>m()</code></a> for more information on virtual elements.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Tools
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="tools">Tools</h2>
|
<h2 id="tools">Tools</h2>
|
||||||
<h3 id="html-to-mithril-template-converter">HTML-to-Mithril Template Converter</h3>
|
<h3 id="html-to-mithril-template-converter">HTML-to-Mithril Template Converter</h3>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
@ -94,18 +94,18 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p>Mithril also has a dependency on XMLHttpRequest. If you wish to support IE6, you'll need <a href="https://gist.github.com/Contra/2709462">a shim for it</a>. IE7 and lower do not support cross-domain AJAX requests.</p>
|
<p>Mithril also has a dependency on XMLHttpRequest. If you wish to support IE6, you'll need <a href="https://gist.github.com/Contra/2709462">a shim for it</a>. IE7 and lower do not support cross-domain AJAX requests.</p>
|
||||||
<p>In addition, note that most <code>m.route</code> modes rely on <code>history.pushState</code> in order to allow moving from one page to another without a browser refresh. <a href="http://caniuse.com/#search=pushstate">IE9 and lower</a> do not support this feature and will gracefully degrade to page refreshes instead.</p>
|
<p>In addition, note that most <code>m.route</code> modes rely on <code>history.pushState</code> in order to allow moving from one page to another without a browser refresh. <a href="http://caniuse.com/#search=pushstate">IE9 and lower</a> do not support this feature and will gracefully degrade to page refreshes instead.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mithril</title>
|
<title>Web Services
- Mithril</title>
|
||||||
<link href="lib/prism/prism.css" rel="stylesheet" />
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="container">
|
<nav class="container">
|
||||||
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
||||||
<a href="getting-started.html">Guide</a>
|
<a href="getting-started.html">Guide</a>
|
||||||
<a href="mithril.html">API</a>
|
<a href="mithril.html">API</a>
|
||||||
<a href="community.html">Community</a>
|
<a href="community.html">Community</a>
|
||||||
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
||||||
<a href="mithril.min.zip">Download</a>
|
<a href="mithril.min.zip">Download</a>
|
||||||
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col(3,3,12)">
|
<div class="col(3,3,12)">
|
||||||
<h2 id="core-topics">Core Topics</h2>
|
<h2 id="core-topics">Core Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="installation.html">Installation</a></li>
|
<li><a href="installation.html">Installation</a></li>
|
||||||
<li><a href="getting-started.html">Getting Started</a></li>
|
<li><a href="getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="routing.html">Routing</a></li>
|
<li><a href="routing.html">Routing</a></li>
|
||||||
<li><a href="web-services.html">Web Services</a></li>
|
<li><a href="web-services.html">Web Services</a></li>
|
||||||
<li><a href="components.html">Components</a></li>
|
<li><a href="components.html">Components</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
||||||
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
||||||
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="misc">Misc</h2>
|
<h2 id="misc">Misc</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
||||||
<li><a href="benchmarks.html">Benchmarks</a></li>
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
||||||
<li><a href="practices.html">Good Practices</a></li>
|
<li><a href="practices.html">Good Practices</a></li>
|
||||||
<li><a href="tools.html">Useful Tools</a></li>
|
<li><a href="tools.html">Useful Tools</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col(9,9,12)">
|
<div class="col(9,9,12)">
|
||||||
<h2 id="web-services">Web Services</h2>
|
<h2 id="web-services">Web Services</h2>
|
||||||
<p>Mithril provides a high-level utility for working with web services, which allows writing asynchronous code relatively procedurally.</p>
|
<p>Mithril provides a high-level utility for working with web services, which allows writing asynchronous code relatively procedurally.</p>
|
||||||
<p>It provides a number of useful features out of the box:</p>
|
<p>It provides a number of useful features out of the box:</p>
|
||||||
|
|
@ -214,18 +214,18 @@ var users = User.list();
|
||||||
deserialize: function(value) {return value;}
|
deserialize: function(value) {return value;}
|
||||||
});
|
});
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
||||||
<br />© 2014 Leo Horie
|
<br />© 2014 Leo Horie
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="lib/prism/prism.js"></script>
|
<script src="lib/prism/prism.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue