faye/faye — pull request #236 by aggressiveasparagus (2013-08-14 17:58:12+00:00)
Title: check for existence of unload event before binding

Some JavaScript runtime environments (eg Google Chrome Packaged Apps) do not expose the 'unload' or 'beforeunload' events. Attempting to bind to these throws an exception. These changes check for the existence of those events before trying to bind to them.