ladybird/Userland/Libraries/LibWeb/HTML/HTMLImageElement.idl
Enver Balalic 862fc91b2c LibWeb: Implement HTMLImageElement::decode with a few FIXMEs
Implements enough of HTMLImageElement::decode for it to not break
websites and actually load an image :)
2024-06-06 08:20:02 +02:00

40 lines
1.8 KiB
Text

#import <HTML/HTMLElement.idl>
#import <HTML/Scripting/Fetching.idl>
// https://html.spec.whatwg.org/multipage/embedded-content.html#htmlimageelement
[Exposed=Window, LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions, Reflect] attribute DOMString alt;
[CEReactions, Reflect] attribute DOMString src;
[CEReactions, Reflect] attribute DOMString srcset;
[CEReactions, Reflect] attribute DOMString sizes;
[CEReactions, Enumerated=CORSSettingsAttribute, Reflect=crossorigin] attribute DOMString? crossOrigin;
[CEReactions, Reflect=usemap] attribute DOMString useMap;
[CEReactions, Reflect=ismap] attribute boolean isMap;
[CEReactions] attribute unsigned long width;
[CEReactions] attribute unsigned long height;
readonly attribute unsigned long naturalWidth;
readonly attribute unsigned long naturalHeight;
readonly attribute boolean complete;
readonly attribute USVString currentSrc;
[FIXME, CEReactions] attribute DOMString referrerPolicy;
[FIXME, CEReactions] attribute DOMString decoding;
[CEReactions, Enumerated=LazyLoadingAttribute, Reflect] attribute DOMString loading;
[CEReactions, Enumerated=FetchPriorityAttribute, Reflect=fetchpriority] attribute DOMString fetchPriority;
Promise<undefined> decode();
// Obsolete
[CEReactions, Reflect] attribute DOMString name;
[FIXME, CEReactions] attribute USVString lowsrc;
[CEReactions, Reflect] attribute DOMString align;
[CEReactions, Reflect] attribute unsigned long hspace;
[CEReactions, Reflect] attribute unsigned long vspace;
[FIXME, CEReactions] attribute USVString longDesc;
[CEReactions, LegacyNullToEmptyString, Reflect] attribute DOMString border;
};