javascript - Jquery: firefox not support unload function -


here jquery code

$(window).unload(function(){      chat_leave() }); 

i want run following function on window unload. not work in firefox.

function chat_leave() { $http.post('/chat/leave/',{chatidlist:$scope.chat_room_id}).then(function (response) {}); } 

above jquery code work perfect in chrome not in firefox there solution above query.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -