mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibWeb: Introduce the concept of "Enumerated" values
This does _NOT_ correspond to anything in the IDL or ECMAScript spec, but is a custom extended attribute. We use it to define the "enumerated" values of an attribute
This commit is contained in:
parent
19bf42a7e6
commit
d767f14df8
Notes:
sideshowbarker
2024-07-17 05:19:06 +09:00
Author: https://github.com/stelar7 Commit: https://github.com/SerenityOS/serenity/commit/d767f14df8 Pull-request: https://github.com/SerenityOS/serenity/pull/21789 Issue: https://github.com/SerenityOS/serenity/issues/21778
5 changed files with 22 additions and 4 deletions
|
@ -1,6 +1,13 @@
|
|||
#import <HTML/HTMLElement.idl>
|
||||
#import <HTML/HTMLFormElement.idl>
|
||||
|
||||
[MissingValueDefault=submit, InvalidValueDefault=submit]
|
||||
enum ButtonTypeState {
|
||||
"submit",
|
||||
"reset",
|
||||
"button"
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#htmlbuttonelement
|
||||
[Exposed=Window]
|
||||
interface HTMLButtonElement : HTMLElement {
|
||||
|
@ -14,7 +21,7 @@ interface HTMLButtonElement : HTMLElement {
|
|||
[CEReactions, Reflect=formnovalidate] attribute boolean formNoValidate;
|
||||
[CEReactions, Reflect=formtarget] attribute DOMString formTarget;
|
||||
[CEReactions, Reflect] attribute DOMString name;
|
||||
[CEReactions, Reflect] attribute DOMString type;
|
||||
[CEReactions, Reflect, Enumerated=ButtonTypeState] attribute DOMString type;
|
||||
[CEReactions, Reflect] attribute DOMString value;
|
||||
|
||||
// FIXME: readonly attribute boolean willValidate;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#import <HTML/MediaError.idl>
|
||||
#import <HTML/TimeRanges.idl>
|
||||
#import <HTML/VideoTrackList.idl>
|
||||
#import <HTML/Scripting/Fetching.idl>
|
||||
|
||||
enum CanPlayTypeResult {
|
||||
"",
|
||||
|
@ -21,7 +22,7 @@ interface HTMLMediaElement : HTMLElement {
|
|||
[Reflect, CEReactions] attribute DOMString src;
|
||||
// FIXME: attribute MediaProvider? srcObject;
|
||||
readonly attribute USVString currentSrc;
|
||||
[Reflect=crossorigin, CEReactions] attribute DOMString? crossOrigin;
|
||||
[Reflect=crossorigin, CEReactions, Enumerated=CORSSettingsAttribute] attribute DOMString? crossOrigin;
|
||||
const unsigned short NETWORK_EMPTY = 0;
|
||||
const unsigned short NETWORK_IDLE = 1;
|
||||
const unsigned short NETWORK_LOADING = 2;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#import <HTML/HTMLElement.idl>
|
||||
#import <HTML/Scripting/Fetching.idl>
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#htmlscriptelement
|
||||
[Exposed=Window]
|
||||
|
@ -11,7 +12,7 @@ interface HTMLScriptElement : HTMLElement {
|
|||
[CEReactions, Reflect=nomodule] attribute boolean noModule;
|
||||
// FIXME: [CEReactions] attribute boolean async;
|
||||
[CEReactions, Reflect] attribute boolean defer;
|
||||
[CEReactions, Reflect=crossorigin] attribute DOMString? crossOrigin;
|
||||
[CEReactions, Reflect=crossorigin, Enumerated=CORSSettingsAttribute] attribute DOMString? crossOrigin;
|
||||
// FIXME: [CEReactions] attribute DOMString text;
|
||||
[CEReactions, Reflect] attribute DOMString integrity;
|
||||
[CEReactions, Reflect=referrerpolicy] attribute DOMString referrerPolicy;
|
||||
|
|
7
Userland/Libraries/LibWeb/HTML/Scripting/Fetching.idl
Normal file
7
Userland/Libraries/LibWeb/HTML/Scripting/Fetching.idl
Normal file
|
@ -0,0 +1,7 @@
|
|||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute
|
||||
[MissingValueDefault=, InvalidValueDefault=anonymous]
|
||||
enum CORSSettingsAttribute {
|
||||
"anonymous",
|
||||
"",
|
||||
"use-credentials"
|
||||
};
|
|
@ -1,8 +1,10 @@
|
|||
#import <HTML/Scripting/Fetching.idl>
|
||||
|
||||
// https://www.w3.org/TR/SVG/interact.html#InterfaceSVGScriptElement
|
||||
[Exposed=Window]
|
||||
interface SVGScriptElement : SVGElement {
|
||||
[Reflect] attribute DOMString type;
|
||||
[Reflect=crossorigin] attribute DOMString? crossOrigin;
|
||||
[Reflect=crossorigin, Enumerated=CORSSettingsAttribute] attribute DOMString? crossOrigin;
|
||||
};
|
||||
|
||||
// FIXME: SVGScriptElement includes SVGURIReference;
|
||||
|
|
Loading…
Add table
Reference in a new issue