@@ -741,7 +741,7 @@ describe('Core htmx Events', function() {
741741 } )
742742
743743 it ( 'preventDefault() in htmx:historyCacheMiss stops the history request' , function ( ) {
744- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
744+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
745745 var handler = htmx . on ( 'htmx:historyCacheMiss' , function ( evt ) {
746746 evt . preventDefault ( )
747747 } )
@@ -760,7 +760,7 @@ describe('Core htmx Events', function() {
760760 this . server . respond ( )
761761 workArea . textContent . should . equal ( 'test2' )
762762
763- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
763+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
764764 htmx . _ ( 'restoreHistory' ) ( '/test1' )
765765 this . server . respond ( )
766766 getWorkArea ( ) . textContent . should . equal ( 'test2' )
@@ -770,7 +770,7 @@ describe('Core htmx Events', function() {
770770 } )
771771
772772 it ( 'htmx:historyCacheMissLoad event can update history swap' , function ( ) {
773- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
773+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
774774 var handler = htmx . on ( 'htmx:historyCacheMissLoad' , function ( evt ) {
775775 evt . detail . historyElt = byId ( 'hist-re-target' )
776776 evt . detail . swapSpec . swapStyle = 'outerHTML'
@@ -793,7 +793,7 @@ describe('Core htmx Events', function() {
793793 this . server . respond ( )
794794 workArea . textContent . should . equal ( 'test2' )
795795
796- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
796+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
797797 htmx . _ ( 'restoreHistory' ) ( '/test1' )
798798 this . server . respond ( )
799799 getWorkArea ( ) . textContent . should . equal ( 'test2Updated' )
@@ -805,7 +805,7 @@ describe('Core htmx Events', function() {
805805 } )
806806
807807 it ( 'htmx:historyCacheMiss event can set custom request headers' , function ( ) {
808- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
808+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
809809 var handler = htmx . on ( 'htmx:historyCacheMiss' , function ( evt ) {
810810 evt . detail . xhr . setRequestHeader ( 'CustomHeader' , 'true' )
811811 } )
@@ -816,7 +816,7 @@ describe('Core htmx Events', function() {
816816 make ( '<div id="d1" hx-push-url="true" hx-get="/test1" hx-swap="outerHTML settle:0">init</div>' )
817817
818818 try {
819- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
819+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME ) // clear cache
820820 htmx . _ ( 'restoreHistory' ) ( '/test1' )
821821 this . server . respond ( )
822822 getWorkArea ( ) . textContent . should . equal ( 'test1' )
@@ -826,7 +826,7 @@ describe('Core htmx Events', function() {
826826 } )
827827
828828 it ( 'preventDefault() in htmx:historyCacheHit stops the history action' , function ( ) {
829- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
829+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
830830 var handler = htmx . on ( 'htmx:historyCacheHit' , function ( evt ) {
831831 evt . preventDefault ( )
832832 } )
@@ -853,7 +853,7 @@ describe('Core htmx Events', function() {
853853 } )
854854
855855 it ( 'htmx:historyCacheHit event can update history swap' , function ( ) {
856- localStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
856+ sessionStorage . removeItem ( HTMX_HISTORY_CACHE_NAME )
857857 var handler = htmx . on ( 'htmx:historyCacheHit' , function ( evt ) {
858858 evt . detail . historyElt = byId ( 'hist-re-target' )
859859 evt . detail . swapSpec . swapStyle = 'outerHTML'
0 commit comments