mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:02:44 +00:00 
			
		
		
		
	 d4a890080d
			
		
	
	
		d4a890080d
		
	
	
	
	
		
			
			NewAKString is effectively the default for any new IDL interface, so let's mark this as the default behavior. It also makes it much easier to figure out whatever interfaces are still left to port over to new AK String.
		
			
				
	
	
		
			56 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <DOM/EventHandler.idl>
 | |
| #import <DOM/EventTarget.idl>
 | |
| #import <HTML/NavigationHistoryEntry.idl>
 | |
| #import <HTML/NavigationTransition.idl>
 | |
| 
 | |
| // https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-interface
 | |
| [Exposed=Window]
 | |
| interface Navigation : EventTarget {
 | |
|   sequence<NavigationHistoryEntry> entries();
 | |
|   readonly attribute NavigationHistoryEntry? currentEntry;
 | |
|   undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options);
 | |
|   readonly attribute NavigationTransition? transition;
 | |
| 
 | |
|   readonly attribute boolean canGoBack;
 | |
|   readonly attribute boolean canGoForward;
 | |
| 
 | |
|   NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {});
 | |
|   NavigationResult reload(optional NavigationReloadOptions options = {});
 | |
| 
 | |
|   NavigationResult traverseTo(DOMString key, optional NavigationOptions options = {});
 | |
|   NavigationResult back(optional NavigationOptions options = {});
 | |
|   NavigationResult forward(optional NavigationOptions options = {});
 | |
| 
 | |
|   attribute EventHandler onnavigate;
 | |
|   attribute EventHandler onnavigatesuccess;
 | |
|   attribute EventHandler onnavigateerror;
 | |
|   attribute EventHandler oncurrententrychange;
 | |
| };
 | |
| 
 | |
| dictionary NavigationUpdateCurrentEntryOptions {
 | |
|   required any state;
 | |
| };
 | |
| 
 | |
| dictionary NavigationOptions {
 | |
|   any info;
 | |
| };
 | |
| 
 | |
| dictionary NavigationNavigateOptions : NavigationOptions {
 | |
|   any state;
 | |
|   NavigationHistoryBehavior history = "auto";
 | |
| };
 | |
| 
 | |
| dictionary NavigationReloadOptions : NavigationOptions {
 | |
|   any state;
 | |
| };
 | |
| 
 | |
| dictionary NavigationResult {
 | |
|   Promise<NavigationHistoryEntry> committed;
 | |
|   Promise<NavigationHistoryEntry> finished;
 | |
| };
 | |
| 
 | |
| enum NavigationHistoryBehavior {
 | |
|   "auto",
 | |
|   "push",
 | |
|   "replace"
 | |
| };
 |