fix opening in new tab for routed links
This commit is contained in:
parent
91a32af76c
commit
913b8a5579
11 changed files with 90 additions and 56 deletions
|
|
@ -147,6 +147,8 @@ m("button", {onclick: alert}); //yields <button></button>,
|
|||
<p>You can set inline styles like this:</p>
|
||||
<pre><code class="lang-javascript">m("div", {style: {border: "1px solid red"}}); //yields <div style="border:1px solid red;"></div></code></pre>
|
||||
<p>Note that in order to keep the framework lean, Mithril does not auto-append units like <code>px</code> or <code>%</code> to any values. Typically, you should not even be using inline styles to begin with (unless you are dynamically changing them).</p>
|
||||
<p>Mithril also does not auto-camel-case CSS properties on inline style attributes, so you should use the Javascript syntax when setting them:</p>
|
||||
<pre><code class="lang-javascript">m("div", {style: {textAlign: "center"}}); //yields <div style="text-align:1px solid red;"></div></code></pre>
|
||||
<hr>
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue