WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
72036
Setting SVGResize event on outermost svg tag via script fails to work
https://bugs.webkit.org/show_bug.cgi?id=72036
Summary
Setting SVGResize event on outermost svg tag via script fails to work
Joel Webber
Reported
2011-11-10 11:08:42 PST
(From the linked chromium bug) - Open attached file. One will see a javascript alert saying callback was added. - Resize browser window. One should see a javascript alert saying resize event was detected. However, Chrome does not do that. There's a bit of a hack in SVGSVGElement::parseMappedAttribute() that grabs 'onresize', et al, attributes at parse time and punts them to the window object, which appears to be correct according to the spec (
http://www.w3.org/TR/SVG/interact.html
). But no such hack exists in SVGSVGElement::addEventListener() for SVGResize, et al, so svg.addEventListener() silently fails.
Attachments
Repro case
(758 bytes, image/svg+xml)
2011-11-10 11:09 PST
,
Joel Webber
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Joel Webber
Comment 1
2011-11-10 11:09:40 PST
Created
attachment 114529
[details]
Repro case
Ahmad Saleem
Comment 2
2022-06-17 15:59:04 PDT
I am able to reproduce this bug in Safari 15.5 on macOS 12.4 and also across all other browsers as well. Where, on window resize, there is no 'resize event detected' triggered. **As long as actual results go based on
Comment 01
** As confirmed in "
Comment 01
", it is happening in "Chrome" as well. Also from the URL< I can see that related Chrome bug is still Open and is not fixed as of Chrome Canary 105. I even tried to look into source code of test case and it has listener on root element with "SVGResize" and also in Chrome bug, the latest test case has slight changed source code and with <script>, the event listener is changed from "SVGResize" to "Resize" but it is still "root" element. Further, on this MDN - I am not able to find much about "resize" support across browser -
https://developer.mozilla.org/en-US/docs/Web/API/SVGElement
I am not sure, which browser has ideal behavior or whether the test case is even valid or not. Whether it should be on VisualViewport? Can someone please confirm and retest it or it is something not implemented yet at all - as a result, it is failing silently? Thanks!
Ryosuke Niwa
Comment 3
2022-06-17 21:05:56 PDT
All browsers match the behavior here so it's unclear that we want to do this. Closing as invalid for now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug