[DPF]Add/Remove events

Hi Jeremy,

This message contains a response to comments on

http://www.w3.org/TR/2004/WD-DPF-20041122/

s6.
Add/remove events should be defined in DPF

Penultimate para of 4.1.4 leaves open whether add/remove events
should be standardized. It seems to be that they should, since
they are needed and generic, and a lack of standardization is
an easily avoidable interoperability failure.

The DPF Working Group agree, addDPFEventListener and  
removeDPFEventListener have been added to the WD and IDL as follows:
5.4.1.1 addDPFEventListener

void addDPFEventListener(in DOMString namespaceURI,
                          in DOMString type,
                          in DOMObject evGroup,
                          in EventListener listener);


This method is used to add a listener for an DPFProperty notification  
identified by the associated type and namespace and event group. It  
is analogous to DOM3 addEventListenerNS. Listeners can be added at  
any level in the hierarchy of properties. Not all events will bubble  
up to the parent property, and this depends on the specific property  
and event.

Parameters

namespaceURI
The namespace URI associated with the event for which the user is  
registering. Can be null if event doesn't have an associdated URI.

type
The type parameter specifies the type of event for which the listener  
wants notification. This paramenter can also be used to register for  
category of events, rather than for a specific event; this assumes  
that event categories are expressed as a hierarchy of names. See  
Section event process model for examples of event categories.

evGroup
The object that represents the event group to associate with the  
EventListener. Use null attach the event to the default group.

listener
Object that implements the EventListener interface.

No Return Value
No Exceptions

5.4.1.2 removeDPFEventListener

void removeDPFEventListener(in DOMString namespaceURI,
                             in DOMString type,
                             in EventListener listener);

This method is used to remove a listener for an DPFProperty  
notification identified by the associated type and namespace. It is  
analogous to DOM3 removeEventListenerNS.

Parameters

namespaceURI
The namespace URI associated with the event. Can be null if event  
doesn't have an associated URI.

type
The type parameter specifies the type of event for which the listener  
wants notification. This paramenter can also be used to register for  
category of events, rather than for a specific event; this assumes  
that event categories are expressed as a hierarchy of names. See  
Section event process model for examples of event categories.

listener
Object that implements the EventListener interface.

No Return Value
No Exceptions

-Keith Waters

Received on Friday, 3 June 2005 13:36:45 UTC