1515package org .htmlunit .javascript .host ;
1616
1717import static org .htmlunit .BrowserVersionFeatures .JS_LOCATION_RELOAD_REFERRER ;
18- import static org .htmlunit .javascript .configuration .SupportedBrowser .IE ;
1918
2019import java .io .IOException ;
2120import java .lang .reflect .Method ;
3534import org .htmlunit .javascript .HtmlUnitScriptable ;
3635import org .htmlunit .javascript .configuration .JsxClass ;
3736import org .htmlunit .javascript .configuration .JsxConstructor ;
38- import org .htmlunit .javascript .configuration .JsxFunction ;
39- import org .htmlunit .javascript .configuration .JsxGetter ;
40- import org .htmlunit .javascript .configuration .JsxSetter ;
4137import org .htmlunit .javascript .host .event .Event ;
4238import org .htmlunit .javascript .host .event .HashChangeEvent ;
4339import org .htmlunit .protocol .javascript .JavaScriptURLConnection ;
@@ -214,7 +210,6 @@ public Object getDefaultValue(final Class<?> hint) {
214210 * @throws IOException if loading the specified location fails
215211 * @see <a href="http://msdn.microsoft.com/en-us/library/ms536342.aspx">MSDN Documentation</a>
216212 */
217- @ JsxFunction (IE )
218213 public void assign (final String url ) throws IOException {
219214 setHref (url );
220215 }
@@ -226,7 +221,6 @@ public void assign(final String url) throws IOException {
226221 * @throws IOException if there is a problem reloading the page
227222 * @see <a href="http://msdn.microsoft.com/en-us/library/ms536342.aspx">MSDN Documentation</a>
228223 */
229- @ JsxFunction (IE )
230224 public void reload (final boolean force ) throws IOException {
231225 final WebWindow webWindow = window_ .getWebWindow ();
232226 final HtmlPage htmlPage = (HtmlPage ) webWindow .getEnclosedPage ();
@@ -245,7 +239,6 @@ public void reload(final boolean force) throws IOException {
245239 * @throws IOException if loading the specified location fails
246240 * @see <a href="http://msdn.microsoft.com/en-us/library/ms536712.aspx">MSDN Documentation</a>
247241 */
248- @ JsxFunction (IE )
249242 public void replace (final String url ) throws IOException {
250243 window_ .getWebWindow ().getHistory ().removeCurrent ();
251244 setHref (url );
@@ -255,7 +248,6 @@ public void replace(final String url) throws IOException {
255248 * Returns the location URL.
256249 * @return the location URL
257250 */
258- @ JsxFunction (functionName = "toString" , value = IE )
259251 public String jsToString () {
260252 if (window_ != null ) {
261253 return getHref ();
@@ -268,7 +260,6 @@ public String jsToString() {
268260 * @return the location URL
269261 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a>
270262 */
271- @ JsxGetter (IE )
272263 public String getHref () {
273264 final WebWindow webWindow = window_ .getWebWindow ();
274265 final Page page = webWindow .getEnclosedPage ();
@@ -303,7 +294,6 @@ public String getHref() {
303294 * @throws IOException if loading the specified location fails
304295 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a>
305296 */
306- @ JsxSetter (IE )
307297 public void setHref (final String newLocation ) throws IOException {
308298 WebWindow webWindow = getWindow (getStartingScope ()).getWebWindow ();
309299 final HtmlPage page = (HtmlPage ) webWindow .getEnclosedPage ();
@@ -341,7 +331,6 @@ public void setHref(final String newLocation) throws IOException {
341331 * @return the search portion of the location URL
342332 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534620.aspx">MSDN Documentation</a>
343333 */
344- @ JsxGetter (IE )
345334 public String getSearch () {
346335 final String search = getUrl ().getQuery ();
347336 if (search == null ) {
@@ -356,7 +345,6 @@ public String getSearch() {
356345 * @throws Exception if an error occurs
357346 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534620.aspx">MSDN Documentation</a>
358347 */
359- @ JsxSetter (IE )
360348 public void setSearch (final String search ) throws Exception {
361349 setUrl (UrlUtils .getUrlWithNewQuery (getUrl (), search ));
362350 }
@@ -366,7 +354,6 @@ public void setSearch(final String search) throws Exception {
366354 * @return the hash portion of the location URL
367355 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a>
368356 */
369- @ JsxGetter (IE )
370357 public String getHash () {
371358 String hash = hash_ ;
372359
@@ -400,7 +387,6 @@ private String getHash(final boolean encoded) {
400387 * @param hash the new hash portion of the location URL
401388 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a>
402389 */
403- @ JsxSetter (IE )
404390 public void setHash (final String hash ) {
405391 // IMPORTANT: This method must not call setUrl(), because
406392 // we must not hit the server just to change the hash!
@@ -454,7 +440,6 @@ private static String decodeHash(final String hash) {
454440 * @return the hostname portion of the location URL
455441 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533785.aspx">MSDN Documentation</a>
456442 */
457- @ JsxGetter (IE )
458443 public String getHostname () {
459444 return getUrl ().getHost ();
460445 }
@@ -465,7 +450,6 @@ public String getHostname() {
465450 * @throws Exception if an error occurs
466451 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533785.aspx">MSDN Documentation</a>
467452 */
468- @ JsxSetter (IE )
469453 public void setHostname (final String hostname ) throws Exception {
470454 setUrl (UrlUtils .getUrlWithNewHost (getUrl (), hostname ));
471455 }
@@ -475,7 +459,6 @@ public void setHostname(final String hostname) throws Exception {
475459 * @return the host portion of the location URL
476460 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533784.aspx">MSDN Documentation</a>
477461 */
478- @ JsxGetter (IE )
479462 public String getHost () {
480463 final URL url = getUrl ();
481464 final int port = url .getPort ();
@@ -493,7 +476,6 @@ public String getHost() {
493476 * @throws Exception if an error occurs
494477 * @see <a href="http://msdn.microsoft.com/en-us/library/ms533784.aspx">MSDN Documentation</a>
495478 */
496- @ JsxSetter (IE )
497479 public void setHost (final String host ) throws Exception {
498480 final String hostname ;
499481 final int port ;
@@ -515,7 +497,6 @@ public void setHost(final String host) throws Exception {
515497 * @return the pathname portion of the location URL
516498 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534332.aspx">MSDN Documentation</a>
517499 */
518- @ JsxGetter (IE )
519500 public String getPathname () {
520501 if (UrlUtils .URL_ABOUT_BLANK == getUrl ()) {
521502 return "blank" ;
@@ -529,7 +510,6 @@ public String getPathname() {
529510 * @throws Exception if an error occurs
530511 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534332.aspx">MSDN Documentation</a>
531512 */
532- @ JsxSetter (IE )
533513 public void setPathname (final String pathname ) throws Exception {
534514 setUrl (UrlUtils .getUrlWithNewPath (getUrl (), pathname ));
535515 }
@@ -539,7 +519,6 @@ public void setPathname(final String pathname) throws Exception {
539519 * @return the port portion of the location URL
540520 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534342.aspx">MSDN Documentation</a>
541521 */
542- @ JsxGetter (IE )
543522 public String getPort () {
544523 final int port = getUrl ().getPort ();
545524 if (port == -1 ) {
@@ -554,7 +533,6 @@ public String getPort() {
554533 * @throws Exception if an error occurs
555534 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534342.aspx">MSDN Documentation</a>
556535 */
557- @ JsxSetter (IE )
558536 public void setPort (final String port ) throws Exception {
559537 setUrl (UrlUtils .getUrlWithNewPort (getUrl (), Integer .parseInt (port )));
560538 }
@@ -564,7 +542,6 @@ public void setPort(final String port) throws Exception {
564542 * @return the protocol portion of the location URL, including the trailing ':'
565543 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534353.aspx">MSDN Documentation</a>
566544 */
567- @ JsxGetter (IE )
568545 public String getProtocol () {
569546 return getUrl ().getProtocol () + ":" ;
570547 }
@@ -575,7 +552,6 @@ public String getProtocol() {
575552 * @throws Exception if an error occurs
576553 * @see <a href="http://msdn.microsoft.com/en-us/library/ms534353.aspx">MSDN Documentation</a>
577554 */
578- @ JsxSetter (IE )
579555 public void setProtocol (final String protocol ) throws Exception {
580556 setUrl (UrlUtils .getUrlWithNewProtocol (getUrl (), protocol ));
581557 }
@@ -609,7 +585,6 @@ private void setUrl(final URL url) throws IOException {
609585 * Returns the {@code origin} property.
610586 * @return the {@code origin} property
611587 */
612- @ JsxGetter (IE )
613588 public String getOrigin () {
614589 return getUrl ().getProtocol () + "://" + getHost ();
615590 }
0 commit comments