Closed Bug 1216294 Opened 9 years ago Closed 8 years ago

History.go summary incorrect about behaviour with no arguments

Categories

(Developer Documentation Graveyard :: API: DOM, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: markamery, Unassigned)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

https://developer.mozilla.org/en-US/docs/Web/API/History currently claims:

    Calling go() without parameters or with a non-integer argument has no effect

but this is contrary to the spec at http://www.w3.org/TR/html5/browsers.html#the-history-interface which states

    When the go(delta) method is invoked, if the argument to the method was omitted
    or has the value zero, the user agent must act as if the location.reload() method
    was called instead. 

I've tested recent versions of Chrome, Firefox, and Safari, and they all exhibit the specified behaviour. Somebody with a Windows machine should test IE and confirm that it does too. If so, the section I quoted should be updated to read

    Calling go() without parameters or with an argument of 0 reloads the page.

and the note that currently exists in the same paragraph about Internet Explorer accepting string arguments should be made into its own sentence.

If IE violates spec in the case where no argument is passed, then of course you'll need to do write something more sophisticated!
Updated the doc.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.