mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:12:44 +00:00 
			
		
		
		
	 d47e431d54
			
		
	
	
		d47e431d54
		
	
	
	
	
		
			
			This also moves getElementsByTagName to ParentNode to remove the code duplication between Document and Element. This additionally fixes a bug where getElementsByTagName did not check if the element was a descendant, meaning it would also include the context element if the condition matched.
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| 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);
 | |
|     undefined removeAttribute(DOMString qualifiedName);
 | |
|     boolean hasAttribute(DOMString qualifiedName);
 | |
|     boolean hasAttributes();
 | |
| 
 | |
|     HTMLCollection getElementsByTagName(DOMString tagName);
 | |
|     HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
 | |
|     HTMLCollection getElementsByClassName(DOMString className);
 | |
| 
 | |
|     // FIXME: This should come from a InnerHTML mixin.
 | |
|     [LegacyNullToEmptyString, CEReactions] attribute DOMString innerHTML;
 | |
| 
 | |
|     [Reflect] attribute DOMString id;
 | |
|     [Reflect=class] attribute DOMString className;
 | |
| 
 | |
|     readonly attribute Element? nextElementSibling;
 | |
|     readonly attribute Element? previousElementSibling;
 | |
| 
 | |
|     [ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
 | |
| 
 | |
|     // FIXME: These should all come from a ParentNode mixin
 | |
|     readonly attribute Element? firstElementChild;
 | |
|     readonly attribute Element? lastElementChild;
 | |
|     readonly attribute unsigned long childElementCount;
 | |
| 
 | |
|     Element? querySelector(DOMString selectors);
 | |
|     ArrayFromVector querySelectorAll(DOMString selectors);
 | |
| 
 | |
|     [SameObject] readonly attribute HTMLCollection children;
 | |
| };
 |