# Class Browser

This object has two goals:

- hide all the global state in the browser caused by the window object
- abstract away all the browser specific features and inconsistencies

- Defined in src/services/browser.js:24

##### Index

### Constructors

constructor

### Properties

$$completeOutstandingRequest
$$incOutstandingRequestCount
baseElement
cachedState
lastBrowserUrl
lastCachedState
lastHistoryState
notifyWhenNoOutstandingRequests
pendingDeferIds
taskTracker
urlChangeInit
urlChangeListeners

### Methods

$$applicationDestroyed
$$checkUrlChange
baseHref
onUrlChange
state
url

## Constructors

### constructor

- new Browser(taskTracker: TaskTracker): Browser

  #### Parameters

  - taskTracker: TaskTracker

  #### Returns Browser

  - Defined in src/services/browser.js:28

## Properties

### $$completeOutstandingRequest

$$completeOutstandingRequest: any

- Defined in src/services/browser.js:48

### $$incOutstandingRequestCount

$$incOutstandingRequestCount: any

- Defined in src/services/browser.js:50

### baseElement

baseElement: HTMLBaseElement

- Defined in src/services/browser.js:45

### cachedState

cachedState: any

- Defined in src/services/browser.js:39
- Defined in src/services/browser.js:112

### lastBrowserUrl

lastBrowserUrl: string

- Defined in src/services/browser.js:43
- Defined in src/services/browser.js:75
- Defined in src/services/browser.js:134

### lastCachedState

lastCachedState: any

- Defined in src/services/browser.js:113

### lastHistoryState

lastHistoryState: any

- Defined in src/services/browser.js:41
- Defined in src/services/browser.js:76
- Defined in src/services/browser.js:114
- Defined in src/services/browser.js:135

### notifyWhenNoOutstandingRequests

notifyWhenNoOutstandingRequests: any

- Defined in src/services/browser.js:52

### pendingDeferIds

pendingDeferIds: {}

- Defined in src/services/browser.js:33

### taskTracker

taskTracker: TaskTracker

- Defined in src/services/browser.js:32

### urlChangeInit

urlChangeInit: boolean

- Defined in src/services/browser.js:36
- Defined in src/services/browser.js:158

### urlChangeListeners

urlChangeListeners: UrlChangeListener[]

- Defined in src/services/browser.js:35

## Methods

### $$applicationDestroyed

- $$applicationDestroyed(): void

  #### Returns void

  - Defined in src/services/browser.js:165

### $$checkUrlChange

- $$checkUrlChange(): void

  #### Returns void

  - Defined in src/services/browser.js:176

### baseHref

- baseHref(): string

  Returns the base href of the document.

  #### Returns string

  The base href.

  - Defined in src/services/browser.js:189

### onUrlChange

- onUrlChange(callback: UrlChangeListener): UrlChangeListener

  Registers a callback to be called when the URL changes.

  #### Parameters

  - callback: UrlChangeListener

    The callback function to register.

  #### Returns UrlChangeListener

  The registered callback function.

  - Defined in src/services/browser.js:147

### state

- state(): any

  Returns the cached state.

  #### Returns any

  The cached state.

  - Defined in src/services/browser.js:91

### url

- url(url: any, state: any): string | Browser

  #### Parameters

  - url: any
  - state: any

  #### Returns string | Browser

  - Defined in src/services/browser.js:62