MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / setHash

Method setHash

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

Sets the hash property. @param fragment the hash property

(final String fragment)

Source from the content-addressed store, hash-verified

128 * @param fragment the {@code hash} property
129 */
130 @JsxSetter
131 public void setHash(final String fragment) throws MalformedURLException {
132 if (url_ == null) {
133 return;
134 }
135 url_ = UrlUtils.getUrlWithNewRef(url_, org.htmlunit.util.StringUtils.isEmptyOrNull(fragment) ? null : fragment);
136 }
137
138 /**
139 * @return the host, that is the hostname, and then, if the port of the URL is nonempty,

Callers 2

setUrlMethod · 0.45
getPageMethod · 0.45

Calls 2

getUrlWithNewRefMethod · 0.95
isEmptyOrNullMethod · 0.45

Tested by

no test coverage detected