website/public/docs/v3.1.3/API/JS/Navigation/MODE.php

51 lines
No EOL
2.4 KiB
PHP

<?= VV::include("modules/snippet/Snippet.php") ?>
<?php // General information ?>
<section class="md">
<container>
<p>(Vegvisir 3)</p>
<h1><code>vegvisir.Navigation.MODE</code></h1>
<p>Change if content should be replaced or inserted when used in <a href=""><code>.navigate()</code></a>.</p>
</container>
</section>
<section class="md">
<container>
<h1>Description</h1>
<?= Snippet::put("docs/API/JS/Navigation/MODE/description", Snippet::JAVASCRIPT) ?>
</container>
</section>
<?php // Method parameters ?>
<section class="md">
<container>
<h2>Values</h2>
</container>
</section>
<section class="md inset">
<container>
<h3><code>REPLACE</code></h3>
<p>Content of the destination URL will replace the content at <a href=""><code>vegvisir.Navigation.POSITION</code></a>.</p>
<ul>
<li><p>Position: <code>beforebegin</code> = Replace the <a href=""><code>target</code></a> element itself.</p></li>
<li><p>Position: <code>afterbegin</code> = Replace the inner contents of the <a href=""><code>target</code></a> element.</li>
<li><p>Position: <code>beforeend</code> = Replace the inner contents of the <a href=""><code>target</code></a> element.</li>
<li><p>Position: <code>afterend</code> = Replace the <a href=""><code>target</code></a> element itself.</p></li>
</ul>
</container>
</section>
<section class="md inset">
<container>
<h3><code>INSERT</code></h3>
<p>Content of the destination URL will append/prepend to the existing content at <a href=""><code>vegvisir.Navigation.POSITION</code></a>.</p>
<p>Setting the mode to <code>INSERT</code> will make <a href=""><code>.navigate()</code></a> behave exactly like <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement"><code>HTMLElement.insertAdjacentElement()</code></a>.</p>
<ul>
<li><p>Position: <code>beforebegin</code> = Prepend before the <a href=""><code>target</code></a> element itself.</p></li>
<li><p>Position: <code>afterbegin</code> = Prepend just inside the <a href=""><code>target</code></a> element, before its first child.</p></li>
<li><p>Position: <code>beforeend</code> = Append just inside the <a href=""><code>target</code></a> element, after its last child.</p></li>
<li><p>Position: <code>afterend</code> = Append after the <a href=""><code>target</code></a> element itself.</p></li>
</ul>
</container>
</section>
<?php // Contribute ?>
<?= VV::shell("shells/docs") ?>