Skip to content
New issue

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

feat: Only trigger a reload if browser sync is not paused #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jack828
Copy link

@jack828 jack828 commented Jun 6, 2021

Hi.

Thank you for the plugin. Saved me writing my own one!

I am trying to allow a developer to toggle browser sync, and I would like to use the http protocol api.

With this fix, the plugin correctly checks whether or not browser sync has been paused and prevents triggering a reload.

It's easy to test:

fetch('http://localhost:3215/__browser_sync__?method=pause').then((res)=>console.log(res))
// make some changes...no reload event...
fetch('http://localhost:3215/__browser_sync__?method=resume').then((res)=>console.log(res))
// make some changes...reload event!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant