SetLocationHash Op

SetLocationHash

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


allows to manipulate window.location.hash to store data in the url without reloading the page.

given a hash in the first parameter, the op will simply replace the whole part behind the # in the url with the given hash.


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)

new value for window.location.hash (without the #)

Update (Trigger)
Active (Number:boolean )

active/inactive

Silent (Number:boolean )

make event not trigger LocationHashRoute op

Allow Empty (Number:boolean )

allow for setting an empty hash, usually triggers a page reload


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