6 examples of 'location href' in JavaScript

Every line of '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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
76function createHref(location) {
77 return history.createHref(resolveLocation(location));
78}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

91getHref(): string {
92 return this.$window.location.href;
93}
389set location(href) {
390 this.$_location.href = href
391}
87setHref(href: string): void {
88 this.$window.location.href = href;
89}
182function createHref(location) {
183 return createPath(location);
184}
209export function provideLocationHref() {
210 return window && window.location.href;
211}

Related snippets