lewisje / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

'this' not getting set correctly in SVG element event callback #475

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In tests/non-licensed/shelley_powers2 is a test that adds an event callback
to a circle. Inside of that code 'this' incorrectly refers to the Window
object and not our circle for the Flash handler.

Original issue reported on code.google.com by bradneub...@google.com on 16 Apr 2010 at 7:13

GoogleCodeExporter commented 8 years ago

Original comment by bradneub...@gmail.com on 16 Apr 2010 at 7:13

GoogleCodeExporter commented 8 years ago
Fixed in r1123. Note that this Issue is a duplicate of Issue 208.

With this fix, 'this' and 'window' for object embeds is generally the same as 
the
firefox native implemenation for all methods that we support. Issue 53 is for 
the
unsupported methods. Issue 208 will remain open to represent the problem where 
event
handlers for object loaded SVG are not running in the proper window context when
added with addEventListener. This is how firefox behaves but it can be argued 
that it
is not correct.

To see how this fix relates to other event hander issues, see
http://spreadsheets.google.com/ccc?key=0AltsRkRxjMyOdC1jc0lsaG43RDlFaFZQM0dsUVAz
ZlE&hl=en

Original comment by grick23@gmail.com on 18 Apr 2010 at 9:01