website/public/docs/v3.1.5/Reference/JavaScript/options.php

55 lines
No EOL
2.6 KiB
PHP

<?= VV::include("public/docs/v3.1.5/Reference/layout") ?>
<main>
<section>
<h1>Navigation.options</h1>
<p>An object containing parameters that can be changed to alter the behavior of a Vegvisir <a href="/docs/v3.1.5/Reference/JavaScript/constructor"><code class="mtk17">Navigation</code></a>.</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/options/description") ?>
</section>
<section>
<h1>Properties</h1>
</section>
<section class="md param">
<h3><code class="mtk6">bool</code></h3>
<h2><code class="mtk10">pushHistory</code></h2>
<p>Flag which when set to:</p>
<ol>
<li>
<code class="mtk6">true</code>
<p>Will cause navigations performed on an instance of <a href="/docs/v3.1.5/Reference/JavaScript/constructor"><code class="mtk17">Navigation</code></a> to push to the History stack and update the browser pathname.</p>
</li>
<li>
<code class="mtk6">false</code>
<p>Will cause a "silent" navigation on an instance of <a href="/docs/v3.1.5/Reference/JavaScript/constructor"><code class="mtk17">Navigation</code></a> that won't update the broweser History stack and won't change the browser pathname.</p>
</li>
</ol>
<p>The default setting for this property is:</p>
<ul>
<li><code class="mtk6">true</code> when the <a href="/docs/v3.1.5/Reference/JavaScript/Env">vv-shell</a> (top navigation) is navigated.</li>
<li><code class="mtk6">false</code> when an element that <strong>isn't</strong> the <a href="/docs/v3.1.5/Reference/JavaScript/Env">vv-shell</a> element is navigated.</li>
</ul>
</section>
<section class="md param">
<h3><code class="mtk6">bool</code></h3>
<h2><code class="mtk10">carryRequestOptions</code></h2>
<p>Flag which when set to:</p>
<ol>
<li>
<code class="mtk6">true</code>
<p>Will cause navigations performed on an instance of <a href="/docs/v3.1.5/Reference/JavaScript/constructor"><code class="mtk17">Navigation</code></a> to carry the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">request method</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response/body">response body</a> that the initiator page received on load.</p>
</li>
<li class="default">
<code class="mtk6">false</code>
<p>Navigations performed on an instance of <a href="/docs/v3.1.5/Reference/JavaScript/constructor"><code class="mtk17">Navigation</code></a> will be sent as <code>GET</code> requests (without a request body).</p>
</li>
</ol>
</section>
<hr>
<section>
<h1>Examples</h1>
</section>
<section>
<p>No examples available.</p>
</section>
</main>