@@ -216,6 +216,12 @@ export class Session {
216216 }
217217 }
218218
219+ historyPoppedWithEmptyState ( location ) {
220+ this . history . replace ( location )
221+ this . view . lastRenderedLocation = location
222+ this . view . cacheSnapshot ( )
223+ }
224+
219225 // Scroll observer delegate
220226
221227 scrollPositionChanged ( position ) {
@@ -260,7 +266,7 @@ export class Session {
260266 // Navigator delegate
261267
262268 allowsVisitingLocationWithAction ( location , action ) {
263- return this . locationWithActionIsSamePage ( location , action ) || this . applicationAllowsVisitingLocation ( location )
269+ return this . applicationAllowsVisitingLocation ( location )
264270 }
265271
266272 visitProposedToLocation ( location , options ) {
@@ -276,9 +282,7 @@ export class Session {
276282 this . view . markVisitDirection ( visit . direction )
277283 }
278284 extendURLWithDeprecatedProperties ( visit . location )
279- if ( ! visit . silent ) {
280- this . notifyApplicationAfterVisitingLocation ( visit . location , visit . action )
281- }
285+ this . notifyApplicationAfterVisitingLocation ( visit . location , visit . action )
282286 }
283287
284288 visitCompleted ( visit ) {
@@ -287,14 +291,6 @@ export class Session {
287291 this . notifyApplicationAfterPageLoad ( visit . getTimingMetrics ( ) )
288292 }
289293
290- locationWithActionIsSamePage ( location , action ) {
291- return this . navigator . locationWithActionIsSamePage ( location , action )
292- }
293-
294- visitScrolledToSamePageLocation ( oldURL , newURL ) {
295- this . notifyApplicationAfterVisitingSamePageLocation ( oldURL , newURL )
296- }
297-
298294 // Form submit observer delegate
299295
300296 willSubmitForm ( form , submitter ) {
@@ -334,9 +330,7 @@ export class Session {
334330 // Page view delegate
335331
336332 viewWillCacheSnapshot ( ) {
337- if ( ! this . navigator . currentVisit ?. silent ) {
338- this . notifyApplicationBeforeCachingSnapshot ( )
339- }
333+ this . notifyApplicationBeforeCachingSnapshot ( )
340334 }
341335
342336 allowsImmediateRender ( { element } , options ) {
@@ -428,15 +422,6 @@ export class Session {
428422 } )
429423 }
430424
431- notifyApplicationAfterVisitingSamePageLocation ( oldURL , newURL ) {
432- dispatchEvent (
433- new HashChangeEvent ( "hashchange" , {
434- oldURL : oldURL . toString ( ) ,
435- newURL : newURL . toString ( )
436- } )
437- )
438- }
439-
440425 notifyApplicationAfterFrameLoad ( frame ) {
441426 return dispatch ( "turbo:frame-load" , { target : frame } )
442427 }
0 commit comments