API Docs for: 0.1.0
Show:

zerk.browser Class

Defined in: src/zerk/browser.js:1
Module: zerk

Browser

Crossbrowser library.

Methods

cancelEvent

(
  • event
)
Boolean

Cancel DOM event

Parameters:

  • event DOMEvent

    DOM event

Returns:

Boolean: Returns false

getElementPosition

(
  • element
)
Object

Returns the position of given DOM element

Parameters:

  • element DOMElement

    DOM element

Returns:

Object: Offset

registerEvent

(
  • element
  • eventName
  • callback
)

Registers a callback function to a DOM element event

Parameters:

  • element DOMElement

    DOM element

  • eventName String

    Event name

  • callback Function

    Callback function

setupRequestAnimationFrame

()

Crossbrowser requestAnimationFrame

http://paulirish.com/2011/requestanimationframe-for-smart-animating/

http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating

requestAnimationFrame polyfill by Erik Möller

fixes from Paul Irish and Tino Zijdel

unregisterEvent

(
  • element
  • eventName
  • callback
)

Unregisters a callback function from a DOM element event

Parameters:

  • element DOMElement

    DOM element

  • eventName String

    Event name

  • callback Function

    Callback function