lewisje / svgweb

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

Call handleEvent on EventListener objects passed to addEventListener #515

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you pass an object to addEventListener the spec calls for it to have a 
handleEvent method. Events should be dispatched by calling handleEvent(evt) on 
the object with 'this' set to the same object.

http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventListener

In practice, nearly everyone passes a function to addEventListener, and so 
there has not been a problem with SVG Web assuming the parameter is a function. 
Its probably in some other spec, but I do not see where it is documented that a 
function can be passed to addEventListener.

I recently stumbled across an example that uses the handleEvent style listener 
and the browsers support it, so we need to.

Original issue reported on code.google.com by grick23@gmail.com on 15 Jun 2010 at 1:31

GoogleCodeExporter commented 8 years ago
Fixed in r1190.

Original comment by grick23@gmail.com on 15 Jun 2010 at 2:35