* @param {?Object} state * @param {?string} title * @param {?string} url * @param {boolean=} opt_fireEvent
(state, title, url, opt_fireEvent)
| 585 | * @param {boolean=} opt_fireEvent |
| 586 | */ |
| 587 | pushState(state, title, url, opt_fireEvent) { |
| 588 | this.index++; |
| 589 | if (this.index < this.stack.length) { |
| 590 | // Remove tail. |
| 591 | this.stack.splice(this.index, this.stack.length - this.index); |
| 592 | } |
| 593 | this.stack[this.index] = { |
| 594 | state: state ? freeze(state) : null, |
| 595 | url, |
| 596 | }; |
| 597 | if (opt_fireEvent) { |
| 598 | this.win.eventListeners.fire({type: 'popstate'}); |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * @param {?Object} state |
no test coverage detected