10 examples of 'window location reload' in JavaScript

Every line of 'window location reload' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
46function reload(win) {
47 if (process.env.NODE_ENV === 'development') {
48 win.loadURL(`file://${__dirname}/../app/index.html`);
49 } else {
50 win.loadURL(`file://${__dirname}/app/index.html`);
51 }
52}
554reload() {
555 const window = cache.getWindow(this.$_pageId);
556 let param = ['type=jump', `targeturl=${encodeURIComponent(this.href)}`];
557 if (this.$_search) param.push(`search=${encodeURIComponent(this.$_search)}`);
558 if (this.$_hash) param.push(`hash=${encodeURIComponent(this.$_hash)}`);
559
560 param = '?' + param.join('&');
561
562 const callMethod = window.$$miniprogram.isTabBarPage(this.$_pageRoute) ? 'switchTab' : 'redirectTo';
563 API[callMethod][this.$_target]({
564 url: `${this.$_pageRoute}${param}`,
565 });
566}
99function reloadLocation() {
100 if (top.leftArea != null && top.leftArea.location != null){
101 top.leftArea.location.reload();
102 }else{
103 if(top.document["lookupForm"]){
104 top.document["lookupForm"].selId.value="";
105 top.document["lookupForm"].submit();
106 }else{
107 top.location.reload();
108 }
109 }
110}
22public async reload(): Promise {
23 await this.waitForNavigation(page.evaluate('location.reload()'));
24}
110function reload() {
111 const script = "mdViewer_reload()"
112 getMainWindow(mainWindow).webContents.executeJavaScript(script)
113}
360function reload_window() {
361 var browser = httpsEverywhere.toolbarButton.selectedBrowser();
362 if (browser) {
363 browser.reload();
364 }
365}
259function reload_window() {
260 var domWin = content.document.defaultView.top;
261 if (!(domWin instanceof CI.nsIDOMWindow)) {
262 HTTPSEverywhere.log(WARN, domWin + " is not an nsIDOMWindow");
263 return null;
264 }
265 try {
266 var webNav = domWin.QueryInterface(CI.nsIInterfaceRequestor)
267 .getInterface(CI.nsIWebNavigation)
268 .QueryInterface(CI.nsIDocShell);
269 } catch(e) {
270 HTTPSEverywhere.log(WARN,"failed to get webNav");
271 return null;
272 }
273 // This choice of flags comes from NoScript's quickReload function; not sure
274 // if it's optimal
275 webNav.reload(webNav.LOAD_FLAGS_CHARSET_CHANGE);
276}
132reload() {
133 this.window.webContents.reload();
134}
127onReload()
128{
129 askBeforeClosing = true
130 isReloading = true
131 remote.getCurrentWindow().webContents.reload()
132}
97async reload() {
98
99 await this[_tab_].reload();
100
101 await this.waitForNavigation();
102}

Related snippets