SVGImageElement

Οι εθελοντές μας δεν έχουν μεταφράσει αυτό το άρθρο στα Ελληνικά, ακόμα. Γίνετε μέλος και βοηθήστε στη μετάφραση!
Μπορείτε επίσης να διαβάσετε το άρθρο στα English (US).

The SVGImageElement interface corresponds to the <image> element.

Properties

This interface also inherits properties from its parent, SVGGraphicsElement.

SVGImageElement.crossOrigin
A DOMString corresponding to the crossorigin attribute of the given <image> element.
SVGImageElement.decoding
Returns a DOMString representing a hint given to the browser on how it should decode the image.
SVGImageElement.height Read only
An SVGAnimatedLength corresponding to the height attribute of the given <image> element.
SVGImageElement.preserveAspectRatio Read only
An SVGAnimatedPreserveAspectRatio corresponding to the preserveAspectRatio attribute of the given <image> element.
SVGImageElement.width Read only
An SVGAnimatedLength corresponding to the width attribute of the given <image> element.
SVGImageElement.x Read only
An SVGAnimatedLength corresponding to the x attribute of the given <image> element.
SVGImageElement.y Read only
An SVGAnimatedLength corresponding to the y attribute of the given <image> element.

Methods

This interface also inherits methods from its parent interface, SVGGraphicsElement.

SVGImageElement.decode()
Initiates asynchronous decoding of the image data. Returns a Promise which resolves once the image data is ready to be used.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of 'SVGImageElement' in that specification.
Candidate Recommendation Changed the inheritance from SVGElement to SVGGraphicsElement, removed the implemented interfaces SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable, and SVGTransformable and added the crossOrigin property.
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'SVGImageElement' in that specification.
Recommendation Initial definition

Browser compatibility

 

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
SVGImageElementChrome Full support 1Edge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
crossOriginChrome No support NoEdge ? Firefox ? IE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
decode()
Experimental
Chrome Full support 65Edge ? Firefox No support NoIE ? Opera ? Safari ? WebView Android Full support 65Chrome Android Full support 65Firefox Android No support NoOpera Android ? Safari iOS ? Samsung Internet Android ?
decoding
Experimental
Chrome Full support 65Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android Full support 65Chrome Android Full support 65Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
heightChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
hrefChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
preserveAspectRatioChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
widthChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
xChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
yChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

 

Εθελοντές και ετικέτες εγγράφου

Συνεισφέροντες σε αυτή τη σελίδα: mdnwebdocs-bot, jpmedley, Sheppy, fscholz, Sebastianz, abbycar, kscarfone, pa7, Jeremie
Τελευταία ενημέρωση από: mdnwebdocs-bot,