HTMLImageElement.idl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #import <Fetch/Request.idl>
  2. #import <HTML/HTMLElement.idl>
  3. #import <HTML/Scripting/Fetching.idl>
  4. // https://html.spec.whatwg.org/multipage/embedded-content.html#htmlimageelement
  5. [Exposed=Window, LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
  6. interface HTMLImageElement : HTMLElement {
  7. [HTMLConstructor] constructor();
  8. [CEReactions, Reflect] attribute DOMString alt;
  9. [CEReactions, Reflect, URL] attribute USVString src;
  10. [CEReactions, Reflect] attribute DOMString srcset;
  11. [CEReactions, Reflect] attribute DOMString sizes;
  12. [CEReactions, Enumerated=CORSSettingsAttribute, Reflect=crossorigin] attribute DOMString? crossOrigin;
  13. [CEReactions, Reflect=usemap] attribute DOMString useMap;
  14. [CEReactions, Reflect=ismap] attribute boolean isMap;
  15. [CEReactions] attribute unsigned long width;
  16. [CEReactions] attribute unsigned long height;
  17. readonly attribute unsigned long naturalWidth;
  18. readonly attribute unsigned long naturalHeight;
  19. readonly attribute boolean complete;
  20. readonly attribute USVString currentSrc;
  21. [CEReactions, Reflect=referrerpolicy, Enumerated=ReferrerPolicy] attribute DOMString referrerPolicy;
  22. [CEReactions] attribute DOMString decoding;
  23. [CEReactions, Enumerated=LazyLoadingAttribute, Reflect] attribute DOMString loading;
  24. [CEReactions, Enumerated=FetchPriorityAttribute, Reflect=fetchpriority] attribute DOMString fetchPriority;
  25. Promise<undefined> decode();
  26. // Obsolete
  27. [CEReactions, Reflect] attribute DOMString name;
  28. [CEReactions, Reflect, URL] attribute USVString lowsrc;
  29. [CEReactions, Reflect] attribute DOMString align;
  30. [CEReactions, Reflect] attribute unsigned long hspace;
  31. [CEReactions, Reflect] attribute unsigned long vspace;
  32. [CEReactions, Reflect=longdesc, URL] attribute USVString longDesc;
  33. [CEReactions, LegacyNullToEmptyString, Reflect] attribute DOMString border;
  34. // https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlimageelement-interface
  35. [FIXME] readonly attribute long x;
  36. [FIXME] readonly attribute long y;
  37. };