We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way such that all connected browsers can close when the Browser-Sync server is stopped?
The text was updated successfully, but these errors were encountered:
I figured out a workaround. In my config file:
let disconnectScript = `<script> window.addEventListener( 'load', function() { ___browserSync___.socket.on( 'disconnect', window.close.bind( window ) ); } ); </script>`; module.exports = { snippetOptions: { rule: { fn: function( snippet, match ) { return snippet + disconnectScript + match; }, match: /<\/head>/i } } }
Sorry, something went wrong.
No branches or pull requests
Issue details
Is there a way such that all connected browsers can close when the Browser-Sync server is stopped?
Steps to reproduce/test case
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
The text was updated successfully, but these errors were encountered: