Menu ▾ ▴

#1749 Location change should be immediately visible after history.pushState call

Latest SVN
closed
RBRi
None
1
2016-03-01
2016-02-21
No

Changes of location should be visible immediately after history.pushState. Calling such JS command:
window.history.pushState(stateObj, 'page 2', 'bar.html');
var newLocationVisible = (location.href.indexOf('bar.html') > -1);

should set newLocationVisible to true, but in HU this change is not visible if such script is one block (function), see attached test.

1 Attachments

Discussion

  • Adam Afeltowicz

    Adam Afeltowicz - 2016-02-21

    It seems that changes in Page object are not visible during execution of one JS block.

     
  • RBRi

    RBRi - 2016-02-22
    • status: open --> accepted
     
  • RBRi

    RBRi - 2016-02-22

    Testcase added com.gargoylesoftware.htmlunit.javascript.host.History2Test.pushStateLocationHref()

     
  • Adam Afeltowicz

    Adam Afeltowicz - 2016-02-26

    It seems that calling loadDownloadedResponses did the trick, please see attachment.

     

    Last edit: Adam Afeltowicz 2016-02-26
  • RBRi

    RBRi - 2016-03-01
    • status: accepted --> closed
    • assigned_to: RBRi
     

Log in to post a comment.