mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:02:45 +00:00 
			
		
		
		
	 ebe704a03d
			
		
	
	
		ebe704a03d
		
	
	
	
	
		
			
			Note there are a couple of type differences between the spec and the IDL file added in this commit. For example, we will need to support a type of Variant to handle spec types such as "(double or sequence<double>)". But for now, this allows web pages to construct an IntersectionObserver with any valid type.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			596 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			596 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| [Exposed=(Window)]
 | |
| interface IntersectionObserver {
 | |
|     // FIXME: Should be: IntersectionObserverCallback
 | |
|     constructor(any callback, optional IntersectionObserverInit options = {});
 | |
| 
 | |
|     undefined observe(Element target);
 | |
|     undefined unobserve(Element target);
 | |
|     undefined disconnect();
 | |
| 
 | |
|     // FIXME:
 | |
|     // sequence<IntersectionObserverEntry> takeRecords();
 | |
| };
 | |
| 
 | |
| dictionary IntersectionObserverInit {
 | |
|     // FIXME: Should be: (Element or Document)?
 | |
|     Node? root = null;
 | |
| 
 | |
|     DOMString rootMargin = "0px";
 | |
| 
 | |
|     // FIXME: Should be: (double or sequence<double>)
 | |
|     any threshold = 0;
 | |
| };
 |