mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-03 23:00:58 +00:00 
			
		
		
		
	
		
			
	
	
		
			28 lines
		
	
	
	
		
			781 B
		
	
	
	
		
			Text
		
	
	
	
	
	
		
		
			
		
	
	
			28 lines
		
	
	
	
		
			781 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| 
								 | 
							
								#import <DOM/EventHandler.idl>
							 | 
						||
| 
								 | 
							
								#import <DOM/EventTarget.idl>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// https://html.spec.whatwg.org/multipage/server-sent-events.html#eventsource
							 | 
						||
| 
								 | 
							
								[Exposed=(Window,Worker)]
							 | 
						||
| 
								 | 
							
								interface EventSource : EventTarget {
							 | 
						||
| 
								 | 
							
								    constructor(USVString url, optional EventSourceInit eventSourceInitDict = {});
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    readonly attribute USVString url;
							 | 
						||
| 
								 | 
							
								    readonly attribute boolean withCredentials;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    // ready state
							 | 
						||
| 
								 | 
							
								    const unsigned short CONNECTING = 0;
							 | 
						||
| 
								 | 
							
								    const unsigned short OPEN = 1;
							 | 
						||
| 
								 | 
							
								    const unsigned short CLOSED = 2;
							 | 
						||
| 
								 | 
							
								    readonly attribute unsigned short readyState;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    // networking
							 | 
						||
| 
								 | 
							
								    attribute EventHandler onopen;
							 | 
						||
| 
								 | 
							
								    attribute EventHandler onmessage;
							 | 
						||
| 
								 | 
							
								    attribute EventHandler onerror;
							 | 
						||
| 
								 | 
							
								    undefined close();
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								dictionary EventSourceInit {
							 | 
						||
| 
								 | 
							
								    boolean withCredentials = false;
							 | 
						||
| 
								 | 
							
								};
							 |