mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-26 01:50:08 +00:00 
			
		
		
		
	This aligns Workers and Window and MessagePorts to all use the same mechanism for transferring serialized messages across realms. It also allows transferring more message ports into a worker. Re-enable the Worker-echo test, as none of the MessagePort tests have themselves been flaky, and those are now using the same underlying implementation.
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			709 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			709 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <DOM/EventTarget.idl>
 | |
| #import <DOM/EventHandler.idl>
 | |
| #import <HTML/MessagePort.idl>
 | |
| 
 | |
| // https://html.spec.whatwg.org/#worker
 | |
| [Exposed=(Window)]
 | |
| interface Worker : EventTarget {
 | |
|     constructor(DOMString scriptURL, optional WorkerOptions options = {});
 | |
| 
 | |
|     undefined terminate();
 | |
|     // FIXME: IDL overload issue here
 | |
|     // FIXME: undefined postMessage(any message, sequence<object> transfer);
 | |
|     undefined postMessage(any message, optional StructuredSerializeOptions options = {});
 | |
| 
 | |
|     attribute EventHandler onmessage;
 | |
|     attribute EventHandler onmessageerror;
 | |
| };
 | |
| 
 | |
| dictionary WorkerOptions {
 | |
|     USVString type = "classic";
 | |
|     USVString credentials = "same-origin";
 | |
|     DOMString name = "";
 | |
| };
 |