DOM 3 custom event objects under sXBL event processing

Hi WG.

After trying to implement a DOM 3 custom event object in script, I
realised that an extra method is required to allow the event to be
retargetted when being dispatched under sXBL.  This method would be used
by the events implementation to get a clone of the event object.  An
author would copy over the custom properties on that event object in
this method.

I suggest introducing an interface similar to this, and requiring any
custom events that will be used in an sXBL context to implement it:

  interface CustomEventXBL : CustomEvent {
      CustomEventXBL cloneEventObject();
  }

  cloneEventObject

    The cloneEventObject is used by the DOM Events implementation to
    obtain a clone of this event object for sXBL event retargetting.
    The method will copy the relevant properties from the original
    object to the cloned object.  The properties specified by the
    Event interface ('type', 'target', etc.) need not be copied over.

    Return Value

      The cloned event object.

    No Parameters

    No Exceptions

This is how I have currently implemented this in Batik (along with a
method 'void resumePropagation()' on CustomEvent to fix the problem I've
mentioned previously).  An example is here:

  http://wiki.apache.org/xmlgraphics-batik/CustomJavaScriptEvents

Also, I can imagine some custom events being retargetted and some being
stopped, depending on their purpose.  Do you think there should be a
way of specifying this to the events implementation?

Thanks,

Cameron

-- 
  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

Received on Wednesday, 21 September 2005 11:47:58 UTC