mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:22:43 +00:00 
			
		
		
		
	 7cdbd59e92
			
		
	
	
		7cdbd59e92
		
	
	
	
	
		
			
			With this change `shared_history_push_replace_state()` starts to actually add/replace session history entry.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     try {
 | |
|         const initialHistoryLength = window.history.length;
 | |
| 
 | |
|         history.pushState({}, "hello", "history-pushstate-iframe.html#hello");
 | |
| 
 | |
|         if (window.self !== window.top) {
 | |
|             parent.postMessage(
 | |
|                 "history object length has changed by " +
 | |
|                     (window.history.length - initialHistoryLength),
 | |
|                 "*"
 | |
|             );
 | |
|         } else {
 | |
|             test(() => {});
 | |
|         }
 | |
|     } catch (e) {
 | |
|         if (window.self !== window.top) parent.postMessage("ERROR:" + e, "*");
 | |
|     }
 | |
| </script>
 |