update build
This commit is contained in:
parent
295833ffcb
commit
189fa8e7ce
3 changed files with 3 additions and 3 deletions
|
|
@ -182,7 +182,7 @@ m("a[href='/dashboard']", {config: m.route}, "Dashboard&q
|
|||
|
||||
where:
|
||||
VirtualElement :: Object { String tag, Attributes attributes, Children children }
|
||||
Attributes :: Object<any | void config(DOMElement element, Boolean isNew)>
|
||||
Attributes :: Object<any | void config(DOMElement element, Boolean isInitialized)>
|
||||
Children :: String text | Array<String text | VirtualElement virtualElement | Children children></code></pre>
|
||||
<ul>
|
||||
<li><p><strong>String selector</strong></p>
|
||||
|
|
@ -216,7 +216,7 @@ where:
|
|||
<p><code>{ style: {border: "1px solid red"} }</code></p>
|
||||
</li>
|
||||
<li><h4 id="the-config-attribute">The <code>config</code> attribute</h4>
|
||||
<p><strong>void config(DOMElement element, Boolean isNew)</strong> (optional)</p>
|
||||
<p><strong>void config(DOMElement element, Boolean isInitialized)</strong> (optional)</p>
|
||||
<p>You can define a non-HTML-standard attribute called <code>config</code>. This special parameter allows you to call methods on the DOM element after it gets created.</p>
|
||||
<p>This is useful, for example, if you declare a <code>canvas</code> element and want to use the Javascript API to draw:</p>
|
||||
<pre><code class="lang-javascript">function draw(element, isInitialized) {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -195,7 +195,7 @@ m("a[href='/dashboard/alicesmith']", {config: m.route});</code
|
|||
<hr>
|
||||
<h4 id="signature">Signature</h4>
|
||||
<p><a href="how-to-read-signatures.html">How to read signatures</a></p>
|
||||
<pre><code class="lang-clike">void route(DOMElement element, Boolean isNew)</code></pre>
|
||||
<pre><code class="lang-clike">void route(DOMElement element, Boolean isInitialized)</code></pre>
|
||||
<ul>
|
||||
<li><p><strong>DOMElement element</strong></p>
|
||||
<p>an anchor element <code><a></code> with an <code>href</code> attribute that points to a route</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue