Re: DOMBuilder needs a getFeature

Mike Mansell wrote:
> 
> While I agree with you in practice, my feeling is that whole point behind
> the getFeature() method was to allow for implementions to have the flexibility
> in delegating DOM functionality to third-party code (See section
> 1.1.12. Mixed DOM implementations in the core spec). I feel that the
> specifications from the W3C should "eat-their-own-dog-food" so to speak.
> Therefore, we should not assume that the object implementing DOMBuilder
> must implement EventTarget. Therefore, you need a getFeature on DOMBuilder.

There's nothing to assume here, it's stated in the spec that objects 
that implement DOMBuilder are expected to implement EventTarget as well 
(maybe the wording should be changed to say "must" in stead of "are 
expected to"?). getFeature() makes sense in places where extensibility 
matters, and where it's not feasable in all implementations to make the 
underlying objects implement all random interfaces, or "features", if 
you like, but in this case, none of the above matters. The size of a 
DOMBuilder hardly matters, so making it implement an additional 
interface is not an issue, and if you care about extending a DOMBuilder, 
you should look into supplying an additional DOMImplementationLS 
implementation that can create the extended DOMBuilder implementations 
for you.

> If you feel that DOMBuilder *MUST* implement EventTarget, then change the
> definition of DOMBuilder to actually extend EventTarget.
> 

No, that's not how things are done in the DOM specs, look at all the 
other similar cases in the DOM specs, no other interfaces inherit 
EventTarget, though some probably could. And note that support for 
events is optional (here, as in all other cases), a DOMBuilder only 
needs to be an EventTarget if it's an asynchronous DOMBuilder, not if 
it's synchronous (and you can tell using DOMBuilder.async).

> And yes, I do think that EventTarget should have a getFeature() method.
> I'll be sending a separate email on that topic later.

I disagree with this too, as I'm sure you've understood by now :-)

> 
> Cheers,
> Mike M

-- 
jst

Received on Wednesday, 21 May 2003 02:57:07 UTC