The JavaScript side of the Cordova FirePhone Head Tracking plugin. It registers some callbacks in the plugin and then modified window.addEventListener and window.removeEventListener functions to be able to understand the Amazon JavaScript API (register and unregister the amazonheadtracking event listeners).