MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / setHref

Method setHref

src/main/java/org/htmlunit/javascript/host/URL.java:251–259  ·  view source on GitHub ↗

Sets the href property. @param href the href property

(final String href)

Source from the content-addressed store, hash-verified

249 * @param href the {@code href} property
250 */
251 @JsxSetter
252 public void setHref(final String href) throws MalformedURLException {
253 if (url_ == null) {
254 return;
255 }
256
257 url_ = UrlUtils.toUrlUnsafe(href);
258 url_ = UrlUtils.removeRedundantPort(url_);
259 }
260
261 /**
262 * @return the origin

Callers 1

setLocationMethod · 0.45

Calls 2

toUrlUnsafeMethod · 0.95
removeRedundantPortMethod · 0.95

Tested by

no test coverage detected