15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* 25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. 35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is free software; you can redistribute it and/or 65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * modify it under the terms of the GNU Library General Public 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * License as published by the Free Software Foundation; either 85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * version 2 of the License, or (at your option) any later version. 95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is distributed in the hope that it will be useful, 115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * but WITHOUT ANY WARRANTY; without even the implied warranty of 125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Library General Public License for more details. 145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * You should have received a copy of the GNU Library General Public License 165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * along with this library; see the file COPYING.LIB. If not, write to 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Boston, MA 02110-1301, USA. 195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */ 205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 21f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)// FIXME: NamedConstructor does not support optional without Default. Fortunately using Undefined makes 22f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)// us use 0 which happens to be the default width and height anyway. 235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)[ 245d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) NamedConstructor=Image([Default=Undefined] optional long width, [Default=Undefined] optional long height), 255d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) ConstructorCallWith=Document 265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)] interface HTMLImageElement : HTMLElement { 27a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) [Reflect] attribute DOMString align; 28a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) [Reflect] attribute DOMString alt; 29197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch [Reflect, TreatNullAs=EmptyString] attribute DOMString border; 30a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) readonly attribute boolean complete; 317242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin; 325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) attribute long height; 335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) [Reflect] attribute long hspace; 345c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) [Reflect] attribute boolean isMap; 35197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch [Reflect, URL] attribute DOMString longDesc; 36197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch [Reflect, URL] attribute DOMString lowsrc; 37a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) [Reflect] attribute DOMString name; 38a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) readonly attribute long naturalHeight; 39a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) readonly attribute long naturalWidth; 40197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch [Reflect, URL] attribute DOMString src; 416f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch [Reflect] attribute DOMString srcset; 4210f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch [Reflect, RuntimeEnabled=PictureSizes] attribute DOMString sizes; 4310f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch [RuntimeEnabled=PictureSizes] readonly attribute DOMString currentSrc; 44a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) [Reflect] attribute DOMString useMap; 455c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) [Reflect] attribute long vspace; 465c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) attribute long width; 4702772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch 485c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) // Extensions 49323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) [MeasureAs=HTMLImageElementX] readonly attribute long x; 50323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) [MeasureAs=HTMLImageElementY] readonly attribute long y; 5107a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch 5207a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch [Reflect, RuntimeEnabled=SubresourceIntegrity] attribute DOMString integrity; 535c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)}; 54