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

Reload the extension as well as the pages #174

Merged
merged 2 commits into from Oct 12, 2017

Conversation

Projects
None yet
4 participants
@bignall
Contributor

bignall commented Aug 13, 2016

chrome.runtime.reload() doesn't actually reload the extension from the source. I solved this by adding chrome.developerPrivate.reload(...). Now when you change the files and livereload is triggered the extension reloads from the source.

bignall added some commits Aug 13, 2016

Reload the extension as well as the pages
chrome.runtime.reload() doesn't actually reload the extension from the source. I solved this by adding chrome.developerPrivate.reload(...). Now when you change the files and livereload is triggered the extension reloads from the source.
@ragingwind

This comment has been minimized.

Show comment
Hide comment
@ragingwind

ragingwind Aug 14, 2016

Collaborator

Would you explain me why reloading is allowed after a minute?

Collaborator

ragingwind commented Aug 14, 2016

Would you explain me why reloading is allowed after a minute?

@bignall

This comment has been minimized.

Show comment
Hide comment
@bignall

bignall Aug 14, 2016

Contributor

If you let it reload every time livereload is triggered by the watch and a bunch of files were updated at once, livereload sends a bunch of messages in a row - 1 for each updated file. Chromereload.js catches each of those messages and reloads the extension multiple times in a row. When that happens Chrome catches the fact that the extension is constantly reloading and disables the extension.

1 minute was an arbitrary setting but so far it's worked for me. Chrome is no longer disabling my extension and I don't usually make changes faster than 1 minute.

I really think that the gulp task really needs modified so that it waits for all the files to be finished updating and only calls livereload.reload once after all the triggers for all the files that were updated.

Contributor

bignall commented Aug 14, 2016

If you let it reload every time livereload is triggered by the watch and a bunch of files were updated at once, livereload sends a bunch of messages in a row - 1 for each updated file. Chromereload.js catches each of those messages and reloads the extension multiple times in a row. When that happens Chrome catches the fact that the extension is constantly reloading and disables the extension.

1 minute was an arbitrary setting but so far it's worked for me. Chrome is no longer disabling my extension and I don't usually make changes faster than 1 minute.

I really think that the gulp task really needs modified so that it waits for all the files to be finished updating and only calls livereload.reload once after all the triggers for all the files that were updated.

@rainchen

This comment has been minimized.

Show comment
Hide comment
@rainchen

rainchen Nov 1, 2016

nice job!
but actually I disabled the chrome.runtime.reload() and using a Chrome extension named "Extensions Reloader" to reload the page, and won't worry Chrome will disable the dev extension anymore.

rainchen commented Nov 1, 2016

nice job!
but actually I disabled the chrome.runtime.reload() and using a Chrome extension named "Extensions Reloader" to reload the page, and won't worry Chrome will disable the dev extension anymore.

@hkdobrev

This comment has been minimized.

Show comment
Hide comment
@hkdobrev

hkdobrev Oct 12, 2017

I've also found 1 minute to be the threshold which Chrome has about detecting frequent reloads.

hkdobrev commented Oct 12, 2017

I've also found 1 minute to be the threshold which Chrome has about detecting frequent reloads.

@ragingwind ragingwind merged commit 337edaa into yeoman:master Oct 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment