- From: Jon Ferraiolo <jonf@adobe.com>
- Date: Mon, 3 Apr 2006 10:50:10 -0700
- To: "Maciej Stachowiak" <mjs@apple.com>
- Cc: <www-svg@w3c.org>
Maciej, OK, I'll take this as one step forward. One thing I will point out is that in response to other Last Call feedback, SVG Tiny 1.2 will now support XML Events as defined by the XML Events spec. This includes <ev:listener>. I mention this because the same question about dynamic changes to <svg:handler> would also apply to <ev:listener>. How about this new attempt for the write-up on <svg:handler>: ----------------- If the handler element's 'type' or 'ev:event' attributes are modified, then the existing event listener is removed and a new one is created. If the 'xlink:href' attribute is modified or if the content of the handler element is modified, then the existing event listener is preserved, but the user agent must execute the updated handler logic. ----------------- I believe we also need corresponding words for <ev:listener>: ----------------- If the listener element's 'event', 'observer' 'target', 'phase', 'propagate' or 'defaultAction' attributes are modified, then the existing event listener is removed and a new one is created. If the 'handler' attribute is modified, then the existing event listener is preserved, but the user agent must execute the updated handler logic. ----------------- As I was researching this issue, I couldn't figure out what DOM Events means by "modified". Suppose the ev:event attribute current says "click" but then script updates the attribute, but to the exact same value (i.e., "click"). Does this represent a modification, and thus fire a mutation event, or are user agent supposed to check to make sure that the new value is actually different than the old value before firing mutation events? Jon -----Original Message----- From: Maciej Stachowiak [mailto:mjs@apple.com] Sent: Saturday, April 01, 2006 1:18 AM To: Jon Ferraiolo Cc: www-svg@w3c.org Subject: Re: SVGT 1.2: dynamic changes to <handler> elements On Mar 1, 2006, at 9:23 AM, Jon Ferraiolo wrote: > Hi Maciej, > This is the official response to your email > (http://lists.w3.org/Archives/Public/www-svg/2005Dec/0243.html). > > We absolutely agree with your suggestion. There was a copy/paste error > when text about the script element was copied into the description of > the handler element. Thanks for catching this. The old text was: > ------------------ > Removing, inserting or altering handler elements after their > content has > been loaded has no effect on executable content, but changes made > to the > parameters that are available from a given handler element must be > reflected when the handler content is executed. > ------------------ > > The new text reads as follows: > ------------------ > Changes to a handler element's attributes and child nodes must be > reflected thereafter in event dispatching and when the handler's > script > logic is executed. > ------------------ > > Thanks for your feedback. Please respond within two weeks if this > response is not satisfactory. Hi Jon, Sorry for the late reply, but I somehow missed this message earlier. The new text is improved but does not specify what happens when removing or inserting handler elements. Also, it's not very clear on what "is reflected" means. Does this change the existing event listener? Does it unregister the previous one and register a new one? Something else mysterious? It would be best to make this explicit in terms of concepts from DOM Events. (I think unregister old and register new is the best model for reflecting content changes.) Regards, Maciej
Received on Monday, 3 April 2006 17:51:07 UTC