/** * Returns the hash portion of the location URL (the portion following the '#'). * @return the hash portion of the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public String jsxGet_hash() { final String hash = getHash(false); if (hash != null) { return "#" + hash; } return ""; }
/** * Returns the hash portion of the location URL (the portion following the '#'). * @return the hash portion of the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public String jsxGet_hash() { final String hash = getHash(false); if (hash != null) { return "#" + hash; } return ""; }
/** * Returns the hash portion of the location URL (the portion following the '#'). * @return the hash portion of the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public String jsxGet_hash() { final String hash = getHash(false); if (hash != null) { return "#" + hash; } return ""; }
private Map<String, Object> convertLocationToMap(Location location) { Map<String, Object> map = Maps.newHashMap(); map.put("href", location.getHref()); map.put("protocol", location.getProtocol()); map.put("host", location.getHost()); map.put("hostname", location.getHostname()); map.put("port", location.getPort()); map.put("pathname", location.getPathname()); map.put("search", location.getSearch()); map.put("hash", location.getHash()); map.put("href", location.getHref()); return map; }
URL url = page.getUrl(); final boolean encodeHash = getBrowserVersion().hasFeature(JS_LOCATION_HREF_HASH_IS_ENCODED); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash);
URL url = page.getUrl(); final boolean encodeHash = getBrowserVersion().hasFeature(JS_LOCATION_HREF_HASH_IS_ENCODED); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash);
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }