Skip to content

Instantly share code, notes, and snippets.

@jpdevries
Created February 26, 2015 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpdevries/e258b059edf6c4ed95c9 to your computer and use it in GitHub Desktop.
Save jpdevries/e258b059edf6c4ed95c9 to your computer and use it in GitHub Desktop.
Safari Speech Synthesis Bug?
/*
it seems like Safari should know to do this itself
I am not sure if speechSynthesis instances are supposed persist navagitaion changes
*/
$(window).bind('beforeunload', function(){
try { window.speechSynthesis.cancel(); } catch (e) {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment