<?= VV::include("public/docs/v3.1.5/Reference/layout") ?>
<main>
	<section>
		<h1>.navigate()</h1>
		<p></p>
	</section>
	<section>
		<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/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.5/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.5/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.5/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.5/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.5/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.5/JS/navigate/example_element_navigate") ?>
	</section>
</main>