diff --git a/Userland/Libraries/LibWeb/HTML/HTMLButtonElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLButtonElement.idl index 3df1dc57cd..6a7abc6bbd 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLButtonElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLButtonElement.idl @@ -1,6 +1,13 @@ #import #import +[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; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.idl index ee9429c695..cbc20ba905 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.idl @@ -3,6 +3,7 @@ #import #import #import +#import 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; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.idl index 4bb4113d3e..12858d3e25 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.idl @@ -1,4 +1,5 @@ #import +#import // 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; diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.idl b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.idl new file mode 100644 index 0000000000..8519922558 --- /dev/null +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.idl @@ -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" +}; diff --git a/Userland/Libraries/LibWeb/SVG/SVGScriptElement.idl b/Userland/Libraries/LibWeb/SVG/SVGScriptElement.idl index 86249d75cc..333c484ccb 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGScriptElement.idl +++ b/Userland/Libraries/LibWeb/SVG/SVGScriptElement.idl @@ -1,8 +1,10 @@ +#import + // 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;