JSDoc: Namespace: init

# Namespace: init

## init

Contains the beef_init() method which starts the BeEF client-side logic. Also, it overrides the 'onpopstate' and 'onclose' events on the windows object.

If beef.pageIsLoaded is true, then this JS has been loaded >1 times and will have a new session id. The new session id will need to know the brwoser details. So sendback the browser details again.

Source:
  - init.js, line 7

### Methods

#### (static) beef_init()

Starts the polling mechanism, and initialize various components:

- browser details (see browser.js) are sent back to the "/init" handler
- the polling starts (checks for new commands, and execute them)
- the logger component is initialized (see logger.js)

Source:
  - init.js, line 71

#### (static) window.onclose()

Source:
  - init.js, line 49

#### (static) window.onload()

Source:
  - init.js, line 26

#### (static) window.onpopstate()

Source:
  - init.js, line 32