hash

package
v0.0.0-...-c88107b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash struct {
	ID     string
	Ranges string

	OnChange func(h *Hash)
	// contains filtered or unexported fields
}

Hash contains the state parsed from URL hash

func New

func New(onChange func(h *Hash)) *Hash

New returns a new Hash instance filled with values from window.localtion.hash

func (*Hash) Reset

func (h *Hash) Reset()

Reset resets the hash properties

func (*Hash) SetID

func (h *Hash) SetID(id string)

SetID sets ID part and updates state (URL in the address bar)

func (*Hash) SetRanges

func (h *Hash) SetRanges(ranges string)

SetRanges sets Ranges part and updates state (URL in the address bar)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL