mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:22:43 +00:00 
			
		
		
		
	 67ceba2e6a
			
		
	
	
		67ceba2e6a
		
	
	
	
	
		
			
			The intent is to use these to autogenerate prototype declarations for Window and WorkerGlobalScope classes. And the spec links are just nice to have :^)
		
			
				
	
	
		
			78 lines
		
	
	
	
		
			2.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
	
		
			2.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <CSS/CSSStyleDeclaration.idl>
 | |
| #import <DOM/ChildNode.idl>
 | |
| #import <DOM/DOMTokenList.idl>
 | |
| #import <DOM/InnerHTML.idl>
 | |
| #import <DOM/NamedNodeMap.idl>
 | |
| #import <DOM/Node.idl>
 | |
| #import <DOM/NodeList.idl>
 | |
| #import <DOM/ParentNode.idl>
 | |
| #import <Geometry/DOMRect.idl>
 | |
| #import <Geometry/DOMRectList.idl>
 | |
| 
 | |
| enum ScrollBehavior { "auto", "smooth" };
 | |
| dictionary ScrollOptions {
 | |
|     ScrollBehavior behavior = "auto";
 | |
| };
 | |
| 
 | |
| enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
 | |
| dictionary ScrollIntoViewOptions : ScrollOptions {
 | |
|     ScrollLogicalPosition block = "start";
 | |
|     ScrollLogicalPosition inline = "nearest";
 | |
| };
 | |
| 
 | |
| // https://dom.spec.whatwg.org/#element
 | |
| [Exposed=Window]
 | |
| interface Element : Node {
 | |
|     readonly attribute DOMString? namespaceURI;
 | |
|     readonly attribute DOMString? prefix;
 | |
|     readonly attribute DOMString localName;
 | |
|     readonly attribute DOMString tagName;
 | |
| 
 | |
|     DOMString? getAttribute(DOMString qualifiedName);
 | |
|     undefined setAttribute(DOMString qualifiedName, DOMString value);
 | |
|     [CEReactions] undefined setAttributeNS(DOMString? namespace , DOMString qualifiedName , DOMString value);
 | |
|     undefined removeAttribute(DOMString qualifiedName);
 | |
|     [CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
 | |
|     boolean hasAttribute(DOMString qualifiedName);
 | |
|     boolean hasAttributes();
 | |
|     [SameObject] readonly attribute NamedNodeMap attributes;
 | |
|     sequence<DOMString> getAttributeNames();
 | |
| 
 | |
|     HTMLCollection getElementsByTagName(DOMString tagName);
 | |
|     HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
 | |
|     HTMLCollection getElementsByClassName(DOMString className);
 | |
| 
 | |
|     [Reflect] attribute DOMString id;
 | |
|     [Reflect=class] attribute DOMString className;
 | |
|     [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
 | |
| 
 | |
|     boolean matches(DOMString selectors);
 | |
|     Element? closest(DOMString selectors);
 | |
| 
 | |
|     // legacy alias of .matches
 | |
|     [ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors);
 | |
| 
 | |
|     readonly attribute Element? nextElementSibling;
 | |
|     readonly attribute Element? previousElementSibling;
 | |
| 
 | |
|     [ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
 | |
| 
 | |
|     DOMRect getBoundingClientRect();
 | |
|     DOMRectList getClientRects();
 | |
| 
 | |
|     readonly attribute long clientTop;
 | |
|     readonly attribute long clientLeft;
 | |
|     readonly attribute long clientWidth;
 | |
|     readonly attribute long clientHeight;
 | |
| 
 | |
|     [CEReactions] Element? insertAdjacentElement(DOMString where, Element element);
 | |
|     undefined insertAdjacentText(DOMString where, DOMString data);
 | |
|     [CEReactions] undefined insertAdjacentHTML(DOMString position, DOMString text);
 | |
| 
 | |
|     undefined scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg = {});
 | |
| 
 | |
| };
 | |
| 
 | |
| Element includes ParentNode;
 | |
| Element includes ChildNode;
 | |
| Element includes InnerHTML;
 |