mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-30 21:01:00 +00:00 
			
		
		
		
	 85842c1739
			
		
	
	
		85842c1739
		
	
	
	
	
		
			
			This begins implementation on form-associated custom elements. This fixes a few WPT tests which I'm importing. Co-authored-by: Sam Atkins <sam@ladybird.org>
		
			
				
	
	
		
			44 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <DOM/ShadowRoot.idl>
 | |
| 
 | |
| // https://html.spec.whatwg.org/multipage/custom-elements.html#elementinternals
 | |
| [Exposed=Window]
 | |
| interface ElementInternals {
 | |
|     // Shadow root access
 | |
|     readonly attribute ShadowRoot? shadowRoot;
 | |
| 
 | |
|     // Form-associated custom elements
 | |
|     undefined setFormValue((File or USVString or FormData)? value,
 | |
|                             optional (File or USVString or FormData)? state);
 | |
| 
 | |
|     readonly attribute HTMLFormElement? form;
 | |
| 
 | |
|     undefined setValidity(optional ValidityStateFlags flags = {},
 | |
|                           optional DOMString message,
 | |
|                           optional HTMLElement anchor);
 | |
|     readonly attribute boolean willValidate;
 | |
|     readonly attribute ValidityState validity;
 | |
|     readonly attribute DOMString validationMessage;
 | |
|     boolean checkValidity();
 | |
|     boolean reportValidity();
 | |
| 
 | |
|     readonly attribute NodeList labels;
 | |
| 
 | |
|     // Custom state pseudo-class
 | |
|     [FIXME, SameObject] readonly attribute CustomStateSet states;
 | |
| };
 | |
| 
 | |
| // Accessibility semantics
 | |
| // ElementInternals includes ARIAMixin;
 | |
| 
 | |
| dictionary ValidityStateFlags {
 | |
|     boolean valueMissing = false;
 | |
|     boolean typeMismatch = false;
 | |
|     boolean patternMismatch = false;
 | |
|     boolean tooLong = false;
 | |
|     boolean tooShort = false;
 | |
|     boolean rangeUnderflow = false;
 | |
|     boolean rangeOverflow = false;
 | |
|     boolean stepMismatch = false;
 | |
|     boolean badInput = false;
 | |
|     boolean customError = false;
 | |
| };
 |