SetLocationHash Op

SetLocationHash

sets window.location.hash to the specified value(s)


<p>allows to manipulate window.location.hash to store data in the url without reloading the page.</p> <p>given a hash in the first parameter, the op will simply replace the whole part behind the # in the url with the given hash.</p>


Full Name
  • Ops.Website.SetLocationHash
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


Example Patch LocationHash Example

how to use the browser location bar to navigate and create deeplinks

Open In Editor

Youtube Video Tutorial

INPUT PORTS


Hash (String)

<p>new value for window.location.hash (without the #)</p>

Update (Trigger)
Active (Number:

<i>boolean</i>

)

<p>active/inactive</p>

Silent (Number:

<i>boolean</i>

)

<p>make event not trigger LocationHashRoute op</p>

Allow Empty (Number:

<i>boolean</i>

)

<p>allow for setting an empty hash, usually triggers a page reload</p>


Patches using SetLocationHash

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarstephan - 2021-03-30 16:17
added lib: navigo.jsuser avatarstephan - 2021-03-30 17:52
Ops.User.stephan.SetLocationHash renamed to Ops.Website.SetLocationHashuser avatarstephan - 2021-03-30 18:36