SVGElement: resize event

The resize event is fired when an SVG document is being resized. This event is only applicable to outermost SVG elements and is dispatched after the resize operation has taken place.

This basically implements the standard resize DOM event.

Bubbles No
Cancelable No
Interface SVGEvent
Event handler property onresize


svgElem.addEventListener('resize', () => {
  console.log('SVG resized.');


Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of 'event changes in SVG2' in that specification.
Candidate Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
resize eventChrome Full support YesEdge Full support ≤79Firefox Full support YesIE ? Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes


Full support  
Full support
Compatibility unknown  
Compatibility unknown