diff --git a/codelab-elements/google-codelab/google_codelab.js b/codelab-elements/google-codelab/google_codelab.js index 76bc23d1b..9f7e4ceef 100644 --- a/codelab-elements/google-codelab/google_codelab.js +++ b/codelab-elements/google-codelab/google_codelab.js @@ -271,8 +271,8 @@ class Codelab extends HTMLElement { if (this.ready_) { this.firePageLoadEvents_(); } else { - this.eventHandler_.listen(this, - CODELAB_READY_EVENT, () => this.firePageLoadEvents_()); + this.eventHandler_.listen( + this, CODELAB_READY_EVENT, () => this.firePageLoadEvents_()); } } break; @@ -343,7 +343,7 @@ class Codelab extends HTMLElement { */ set hash(newHash) { if (newHash !== '' && window.location.hash !== newHash) { - window.location.hash = newHash; + window.history.replaceState({newHash}, document.title, newHash); } }