Every line of 'window parent location href' 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.
231 function after_setWindowLocation(win, url) { 232 goog.dom.safe.setLocationHref(win.location, url); 233 }
389 set location(href) { 390 this.$_location.href = href 391 }
155 updateLocation(window, url) { 156 if (window === this.current) 157 this.current.url = url; 158 window.document._URL = url; 159 window.document._location = new Location(this, url); 160 }
182 function createHref(location) { 183 return createPath(location); 184 }
209 export function provideLocationHref() { 210 return window && window.location.href; 211 }
600 setWindowLocationUrl: function setWindowLocationUrl (url) { 601 var windowLocation = this._windowLocation || window.location; // Allow stubbing for unit testing 602 603 // Prefer assign(), but some devices don't have this function. 604 if (typeof windowLocation.assign === 'function') { 605 windowLocation.assign(url); 606 } else { 607 windowLocation.href = url; 608 } 609 },
43 getBaseHrefFromDOM(): string { return getDOM().getBaseHref(this._doc); }
76 function createHref(location) { 77 return history.createHref(resolveLocation(location)); 78 }
554 reload() { 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 }
151 navigating (url) { 152 // console.log('CDP navigate', url) 153 this.client.Page.navigate({url}); // Note: workaround for https://github.com/cyrus-and/chrome-remote-interface/issues/324 154 return this.client.Page.navigate({url}); 155 }