How to use the href function from url

Find comprehensive JavaScript url.href code examples handpicked from public code repositorys.

187
188
189
190
191
192
193
194
195
196
// Prints https://example.com:81/foo
```

Invalid hostname values assigned to the `hostname` property are ignored.

#### url.href

* {string}

Gets and sets the serialized URL.
fork icon19
star icon213
watch icon17

+ 13 other calls in file