mirror of
https://codeberg.org/vegvisir/website.git
synced 2025-09-14 17:03:42 +02:00
Brand new design for the website following the new design language I used for [version 2.0 of my personal website](https://codeberg.org/vlw/vlw.se/releases/tag/2.0.0). Reviewed-on: https://codeberg.org/vegvisir/website/pulls/2 Co-authored-by: vlw <victor@vlw.se> Co-committed-by: vlw <victor@vlw.se>
55 lines
No EOL
2.6 KiB
PHP
55 lines
No EOL
2.6 KiB
PHP
<?= VV::include("public/docs/v3.1.4/Reference/layout") ?>
|
|
<main>
|
|
<section>
|
|
<h1>.navigate()</h1>
|
|
<p></p>
|
|
</section>
|
|
<section>
|
|
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/JS/navigate/description") ?>
|
|
</section>
|
|
<section>
|
|
<h1>Parameters</h1>
|
|
</section>
|
|
<section class="md param">
|
|
<h3><code class="mtk17">HTMLElement</code> | <code class="mtk17">String</code> | <code class="mtk6">null</code></h3>
|
|
<h2><code class="mtk10">target</code></h2>
|
|
<p>An element passed either by reference or a CSS selector passed as a string (if multiple elements match the selector; the first match will be navigated).</p>
|
|
<p>If null or no value is passed to this argument, the <a href="/docs/v3.1.4/Reference/JavaScript/Env"><code>vv-shell</code></a> element will be navigated (top navigation).</p>
|
|
</section>
|
|
<section class="md param">
|
|
<h3><code class="mtk17">String</code></h3>
|
|
<h2><code class="mtk10">position</code></h2>
|
|
<p>A <a href="/docs/v3.1.4/Reference/JavaScript/POSITION">Navigation.POSITION</a> string which will determine where content from the navigated page should be injected relative to <code class="mtk10">target</code>.</p>
|
|
</section>
|
|
<section class="md param">
|
|
<h3><code class="mtk17">String</code></h3>
|
|
<h2><code class="mtk10">mode</code></h2>
|
|
<p>A <a href="/docs/v3.1.4/Reference/JavaScript/MODE">Navigation.MODE</a> string which will determine how content from the navigated page should be injected relative to <code class="mtk10">target</code>.</p>
|
|
</section>
|
|
<section>
|
|
<h1>Return value</h1>
|
|
</section>
|
|
<section>
|
|
<h3><code class="mtk17">Promise</code></h3>
|
|
<p>Returns a Promise that will resolve when the navigated page has been injected sucessfully, or rejects if the navigation failed <strong>or</strong> if the navigation was aborted with <a href="/docs/v3.1.4/Reference/JavaScript/abort"><code>Navigation.abort</code></a></p>
|
|
</section>
|
|
<hr>
|
|
<section>
|
|
<h1>Examples</h1>
|
|
</section>
|
|
<section>
|
|
<h2>Top navigation</h2>
|
|
<p>Navigate the <code>vv-shell</code> element to another page (top navigation).</p>
|
|
<p>Remember that anchor tags with href's on the same origin are automatically navigated this way.</p>
|
|
</section>
|
|
<section>
|
|
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/JS/navigate/example_shell_navigate") ?>
|
|
</section>
|
|
<section>
|
|
<h2>Navigating an element</h2>
|
|
<p>Simple programmatic navigation of an element.</p>
|
|
</section>
|
|
<section>
|
|
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/JS/navigate/example_element_navigate") ?>
|
|
</section>
|
|
</main>
|