JS Client - Window unload is deprecated as of jQuery 1.8 #2240

Closed
NTaylorMullen opened this Issue Jun 28, 2013 · 2 comments

Projects

None yet

4 participants

@NTaylorMullen
Contributor

We currently do:

_pageWindow.unload(function () {
    connection.stop(false /* async */);
});

but as of jQuery 1.8 window unload is deprecated. http://api.jquery.com/unload/.

They suggest replacing it with $(window).on('unload', function() {...});

Issue is that 'on' was added in jQuery 1.7 (http://api.jquery.com/on/) but we depend on jQuery 1.6.4. Therefore we should replace it with .bind (like all our other event handlers).

@davidfowl
Member

Ask and you shall receive 😄

@DamianEdwards DamianEdwards was assigned Jul 5, 2013
@gustavo-armenta
Contributor

tested connection.Stop() is called and executes changestate to disconnected.
Validated on IE9, IE10, Chrome using jquery 1.6.4 and 1.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment