rails/turbolinks — pull request #304 by jonwolfe (2013-12-01 17:40:16+00:00)
Title: Make Turbolinks not throw javascript exceptions on IE < 9

Turbolinks does not gracefully degrade to non-ajax behavior on IE < 9. Instead, it triggers javascript exceptions.

The exceptions happen because event handlers are installed via document.addEventListener() even when the browser doesn't support Turbolinks. Calling document.addEventListener() on IE8 triggers an exception.

Seemed to me the simplest fix was to only call installDocumentReadyPageEventTriggers() and installJqueryAjaxSuccessPageUpdateTrigger() if Turbolinks is supported.