Interface JQuery

Index

Methods

Methods

public getState(key?: string, coerce?: boolean): any

Retrieves the current 'state' from the browser history, parsing location.hash for a specific key or returning an object containing the entire state, optionally coercing numbers, booleans, null and undefined values.

name

key An optional state key for which to return a value.

name

coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false

Parameters

  • key?: string optional
  • coerce?: boolean optional

Returns

any

public getState(coerce?: boolean): any

Parameters

  • coerce?: boolean optional

Returns

any

public pushState(params?: string, merge_mode?: number)

Adds a 'state' into the browser history at the current position, setting location.hash and triggering any bound callbacks (provided the new state is different than the previous state).

name

params A serialized params string or a hash string beginning with # to merge into location.hash.

name

merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2)

Parameters

  • params?: string optional
  • merge_mode?: number optional

public pushState(params?: any, merge_mode?: number)

Parameters

  • params?: any optional
  • merge_mode?: number optional

public removeState(key?: Array<any>)

Remove one or more keys from the current browser history 'state', creating a new state, setting location.hash and triggering any bound

callbacks (provided the new state is different than the previous state).

name

key One or more key values to remove from the current state.

Parameters

  • key?: Array<any> optional