blob: 3de7e0405f88d228119e122f6fffcbfbec4a57b7 [file] [log] [blame]
/*
* Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// https://html.spec.whatwg.org/multipage/embedded-content.html#htmlimageelement
[
ExportMacro=WEBCORE_EXPORT,
JSGenerateToNativeObject,
Exposed=Window,
LegacyFactoryFunctionCallWith=Document,
LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)
] interface HTMLImageElement : HTMLElement {
[CEReactions=NotNeeded, Reflect] attribute DOMString alt;
[CEReactions=NotNeeded, Reflect, URL] attribute USVString src;
[CEReactions=NotNeeded, Reflect] attribute USVString srcset;
[CEReactions=NotNeeded, Reflect] attribute DOMString sizes;
[CEReactions=NotNeeded] attribute DOMString? crossOrigin;
[CEReactions=NotNeeded, Reflect] attribute DOMString useMap;
[CEReactions=NotNeeded, Reflect] attribute boolean isMap;
[CEReactions=NotNeeded] attribute unsigned long width;
[CEReactions=NotNeeded] attribute unsigned long height;
readonly attribute long naturalHeight;
readonly attribute long naturalWidth;
readonly attribute boolean complete;
readonly attribute USVString currentSrc;
[CEReactions=NotNeeded, EnabledBySetting=ReferrerPolicyAttributeEnabled, ImplementedAs=referrerPolicyForBindings] attribute DOMString referrerPolicy;
[CEReactions=NotNeeded] attribute DOMString decoding;
[CEReactions, EnabledBySetting=LazyImageLoadingEnabled, ImplementedAs=loadingForBindings] attribute DOMString loading;
Promise<undefined> decode();
// Obsolete: Still part of the HTML specification (https://html.spec.whatwg.org/multipage/obsolete.html#HTMLImageElement-partial)
[CEReactions=NotNeeded, Reflect] attribute DOMString name;
[CEReactions=NotNeeded, Reflect, URL] attribute USVString lowsrc;
[CEReactions=NotNeeded, Reflect] attribute DOMString align;
[CEReactions=NotNeeded, Reflect] attribute unsigned long hspace;
[CEReactions=NotNeeded, Reflect] attribute unsigned long vspace;
[CEReactions=NotNeeded, Reflect, URL] attribute USVString longDesc;
[CEReactions=NotNeeded, Reflect] attribute [LegacyNullToEmptyString] DOMString border;
// Non-standard
[Conditional=ATTACHMENT_ELEMENT, EnabledAtRuntime=AttachmentElementEnabled] readonly attribute DOMString attachmentIdentifier;
};