Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8126167

WebHistory API looks inconsistent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7u6
    • 7u6
    • javafx
    • web

      It is probably too late to bring this up but I find the current WebHistory API somewhat inconsistent.

      First, I find it a little odd that WebHistory.go throws an exception if the resulting position is out of bounds, whereas WebHistory.goBack and WebHistory.goForward, in conceptually the same situation, do not throw any exceptions and silently act as no-ops.

      I think I also find little value in WebHistory.goBack and WebHistory.goForward without WebHistory.canGoBack and WebHistory.canGoForward, as I can achieve the same results with go(-1) and go(+1), which is more compact and by definition consistent with other uses of WebHistory.go.

      I also think that the WebHistory.maxSize property should throw an exception when the user attempts to set it to an illegal value, for consistency with WebHistory.go and the rest of JavaFX.

            ant Anton Tarasov (Inactive)
            vbaranov Vasiliy Baranov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: