@@ -921,6 +921,19 @@ define(function LiveDevelopment(require, exports, module) {
921921 return loadAgents ( ) ;
922922 }
923923
924+ /** reload the live preview */
925+ function reload ( ) {
926+ // Unload and reload agents before reloading the page
927+ // Some agents (e.g. DOMAgent and RemoteAgent) require us to
928+ // navigate to the page first before loading can complete.
929+ // To accomodate this, we load all agents (in reconnect())
930+ // and navigate in parallel.
931+ reconnect ( ) ;
932+
933+ // Reload HTML page
934+ Inspector . Page . reload ( ) ;
935+ }
936+
924937 /**
925938 * Close the connection and the associated window asynchronously
926939 * @return {jQuery.Promise } Resolves once the connection is closed
@@ -1368,15 +1381,7 @@ define(function LiveDevelopment(require, exports, module) {
13681381 wasRequested = agents . network && agents . network . wasURLRequested ( documentUrl ) ;
13691382
13701383 if ( wasRequested ) {
1371- // Unload and reload agents before reloading the page
1372- // Some agents (e.g. DOMAgent and RemoteAgent) require us to
1373- // navigate to the page first before loading can complete.
1374- // To accomodate this, we load all agents (in reconnect())
1375- // and navigate in parallel.
1376- reconnect ( ) ;
1377-
1378- // Reload HTML page
1379- Inspector . Page . reload ( ) ;
1384+ reload ( ) ;
13801385 }
13811386 }
13821387
@@ -1447,6 +1452,7 @@ define(function LiveDevelopment(require, exports, module) {
14471452 exports . open = open ;
14481453 exports . close = close ;
14491454 exports . reconnect = reconnect ;
1455+ exports . reload = reload ;
14501456 exports . enableAgent = enableAgent ;
14511457 exports . disableAgent = disableAgent ;
14521458 exports . getLiveDocForPath = getLiveDocForPath ;
0 commit comments