What is need History.fireCurrentHistoryState() in GWT History?

前端 未结 1 533
面向向阳花
面向向阳花 2021-01-14 05:04

Hello I am working on a GWT sample history management application. Here is my onModuleLoad Code.

public void onModuleLoad() {
    ContentPanel panel = Conten         


        
相关标签:
1条回答
  • 2021-01-14 06:01

    History.fireCurrentHistoryState() invokes your history handlers without actually inserting new history item in browser history stack, while History.newItem(token) does insert new history token into history stack.

    Note: if your current token is the same as new token (i.e. same page is reloaded), then browsers do not insert this into history stack. In this case (current token == new token) History.fireCurrentHistoryState() has the same effect as History.newItem(currentToken).

    0 讨论(0)
提交回复
热议问题