| 
									
										
										
										
											2024-08-22 17:27:30 +01:00
										 |  |  | #import <DOM/EventTarget.idl> | 
					
						
							|  |  |  | #import <DOM/EventHandler.idl> | 
					
						
							|  |  |  | #import <HTML/Worker.idl> | 
					
						
							| 
									
										
										
										
											2024-11-30 18:01:40 +13:00
										 |  |  | #import <ServiceWorker/ServiceWorkerRegistration.idl> | 
					
						
							| 
									
										
										
										
											2024-08-22 17:27:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | // https://w3c.github.io/ServiceWorker/#serviceworkercontainer-interface | 
					
						
							|  |  |  | [SecureContext, Exposed=(Window,Worker)] | 
					
						
							|  |  |  | interface ServiceWorkerContainer : EventTarget { | 
					
						
							|  |  |  |     [FIXME] readonly attribute ServiceWorker? controller; | 
					
						
							|  |  |  |     [FIXME] readonly attribute Promise<ServiceWorkerRegistration> ready; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-14 21:24:41 -06:00
										 |  |  |     // FIXME: [NewObject] Promise<ServiceWorkerRegistration> register((TrustedScriptURL or USVString) scriptURL, optional RegistrationOptions options = {}); | 
					
						
							|  |  |  |     [NewObject, ImplementedAs=register_] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options = {}); | 
					
						
							| 
									
										
										
										
											2024-08-22 17:27:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     [FIXME, NewObject] Promise<(ServiceWorkerRegistration or undefined)> getRegistration(optional USVString clientURL = ""); | 
					
						
							|  |  |  |     [FIXME, NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     [FIXME] undefined startMessages(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // events | 
					
						
							| 
									
										
										
										
											2024-09-04 15:16:30 -06:00
										 |  |  |     attribute EventHandler oncontrollerchange; | 
					
						
							| 
									
										
										
										
											2024-08-25 12:10:41 +01:00
										 |  |  |     attribute EventHandler onmessage; // event.source of message events is ServiceWorker object | 
					
						
							| 
									
										
										
										
											2024-08-25 12:13:24 +01:00
										 |  |  |     attribute EventHandler onmessageerror; | 
					
						
							| 
									
										
										
										
											2024-08-22 17:27:30 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | dictionary RegistrationOptions { | 
					
						
							|  |  |  |     USVString scope; | 
					
						
							|  |  |  |     WorkerType type = "classic"; | 
					
						
							|  |  |  |     ServiceWorkerUpdateViaCache updateViaCache = "imports"; | 
					
						
							|  |  |  | }; |