avevlad / gulp-connect

Gulp plugin to run a webserver (with live reload)
https://npmjs.org/package/gulp-connect
MIT License
632 stars 113 forks source link

FR: Allow configuring connect.reload() so reloading affects only an iframe instead of the whole document, passing that iframe's id #269

Open franktopel opened 5 years ago

franktopel commented 5 years ago

We have a use-case where most of the time code changes only affect what's going on inside an iframe. The src of that iframe depends on which component a developer has picked to inspect on the iframe stage.

As this could possibly be a not-so-uncommon usecase, it would be great to have an option that allows passing a configuration to connect.reload() which would allow something like

connect.reload({ iframe: "id-of-my-iframe" });

or even better, for refreshing several iframes:

connect.reload({ iframes: ["id-of-my-iframe", "id-of-my-other-iframe"] });