docs about extract
This commit is contained in:
parent
bb54a3b675
commit
f589a33842
9 changed files with 34 additions and 2 deletions
|
|
@ -64,7 +64,14 @@
|
|||
<p><a href="/mithril/archive/v0.1.9">v0.1.9</a> - maintenance</p>
|
||||
<h3 id="news-">News:</h3>
|
||||
<ul>
|
||||
<li>added comparison with React to homepage</li>
|
||||
<li>added support for multi-island apps <a href="https://github.com/lhorie/mithril.js/issues/34">#34</a></li>
|
||||
<li>m.prop is now JSON-serializable <a href="https://github.com/lhorie/mithril.js/issues/54">#54</a></li>
|
||||
<li>added <code>extract</code> option to <code>m.request</code> to allow access to response metadata <a href="https://github.com/lhorie/mithril.js/issues/53">#53</a></li>
|
||||
</ul>
|
||||
<h3 id="breaking-changes-">Breaking changes:</h3>
|
||||
<ul>
|
||||
<li>changing an id in a virtual element now recreates the element, instead of recycling it <a href="https://github.com/lhorie/mithril.js/issues/55">#55</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<p><a href="/mithril/archive/v0.1.8">v0.1.8</a> - maintenance</p>
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@
|
|||
<p>Then, to use Mithril, point a script tag to the downloaded file:</p>
|
||||
<pre><code class="lang-markup"><script src="/components/lhorie/mithril/master/mithril.min.js"></script></code></pre>
|
||||
<hr>
|
||||
<h3 id="rails">Rails</h3>
|
||||
<p>Jordan Humphreys created a gem to allow integration with Rails:</p>
|
||||
<p><a href="Mithril-Rails"><a href="https://github.com/mrsweaters/mithril-rails">https://github.com/mrsweaters/mithril-rails</a></a></p>
|
||||
<p>It includes support for the <a href="https://github.com/insin/msx">MSX</a> HTML templating syntax from Jonathan Buchanan.</p>
|
||||
<hr>
|
||||
<h3 id="github">Github</h3>
|
||||
<p>You can also fork the latest stable project <a href="https://github.com/lhorie/mithril">directly from Github</a>.</p>
|
||||
<p>If you want to use the bleeding edge version, you can <a href="https://github.com/lhorie/mithril">fork the development repository</a>.</p>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -324,7 +324,7 @@ where:
|
|||
</li>
|
||||
<li><p><strong>any extract(XMLHttpRequest xhr, XHROptions options)</strong> (optional)</p>
|
||||
<p>Method to use to extract the data from the raw XMLHttpRequest. This is useful when the relevant data is either in a response header or the status field.</p>
|
||||
<p>If this parameter is falsy, <code>xhr.responseText</code> will be used.</p>
|
||||
<p>If this parameter is falsy, the default value is <code>function(xhr, options) {return xhr.responseText}</code>.</p>
|
||||
</li>
|
||||
<li><p><strong>void type(Object<any> data)</strong> (optional)</p>
|
||||
<p>The response object (or the child items if this object is an Array) will be passed as a parameter to the class constructor defined by <code>type</code></p>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
</html>
|
||||
};</code></pre>
|
||||
<p>Note, however, that since the code above is not valid Javascript, this syntax can only be used with a preprocessor build tool such as the provided <a href="http://gulpjs.com">Gulp.js</a> script.</p>
|
||||
<p>This tool is also available as a <a href="https://github.com/mrsweaters/mithril-rails">Rails gem</a>, created by Jordan Humphreys.</p>
|
||||
<hr>
|
||||
<h3 id="mithril-template-compiler">Mithril Template Compiler</h3>
|
||||
<p>You can pre-compile Mithril templates to make them run faster. For more information see this page:</p>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,14 @@
|
|||
|
||||
### News:
|
||||
|
||||
- added comparison with React to homepage
|
||||
- added support for multi-island apps [#34](https://github.com/lhorie/mithril.js/issues/34)
|
||||
- m.prop is now JSON-serializable [#54](https://github.com/lhorie/mithril.js/issues/54)
|
||||
- added `extract` option to `m.request` to allow access to response metadata [#53](https://github.com/lhorie/mithril.js/issues/53)
|
||||
|
||||
### Breaking changes:
|
||||
|
||||
- changing an id in a virtual element now recreates the element, instead of recycling it [#55](https://github.com/lhorie/mithril.js/issues/55)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,16 @@ Then, to use Mithril, point a script tag to the downloaded file:
|
|||
|
||||
---
|
||||
|
||||
### Rails
|
||||
|
||||
Jordan Humphreys created a gem to allow integration with Rails:
|
||||
|
||||
[https://github.com/mrsweaters/mithril-rails](Mithril-Rails)
|
||||
|
||||
It includes support for the [MSX](https://github.com/insin/msx) HTML templating syntax from Jonathan Buchanan.
|
||||
|
||||
---
|
||||
|
||||
### Github
|
||||
|
||||
You can also fork the latest stable project [directly from Github](https://github.com/lhorie/mithril).
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ where:
|
|||
|
||||
Method to use to extract the data from the raw XMLHttpRequest. This is useful when the relevant data is either in a response header or the status field.
|
||||
|
||||
If this parameter is falsy, `xhr.responseText` will be used.
|
||||
If this parameter is falsy, the default value is `function(xhr, options) {return xhr.responseText}`.
|
||||
|
||||
- **void type(Object<any> data)** (optional)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ todo.view = function(ctrl) {
|
|||
|
||||
Note, however, that since the code above is not valid Javascript, this syntax can only be used with a preprocessor build tool such as the provided [Gulp.js](http://gulpjs.com) script.
|
||||
|
||||
This tool is also available as a [Rails gem](https://github.com/mrsweaters/mithril-rails), created by Jordan Humphreys.
|
||||
|
||||
---
|
||||
|
||||
### Mithril Template Compiler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue