faye/faye — pull request #235 by aggressiveasparagus (2013-08-12 09:32:52+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.