Re: WG clarification request for SVG_WRONG_TYPE_ERR

Jonathan Watt wrote:
> On Sun, 8 Aug 2004, Robin Berjon wrote:
>>  c) only UA objects are allowed to be passed to those methods.
>>
>>Having to chose between (a) and (b) I would prefer (b) because it is 
>>more consistent, and is conducive to sticking to what users expect. I 
>>think (c) is not an option at all, as it would break existing code that 
>>creates Ecmascript objects in place, something that's widely used for 
>>event handlers and namespace resolvers.
> 
> I was "perhapsing" (c) - see my previous email for an explaination.
> Personally I doubt that there is a huge amount of code for SVG out there
> that that would break, but I could be wrong. I agree it would be better
> not to place such a restriction, but the other option is that Mozilla will
> never throw SVG_WRONG_TYPE_ERR. I don't see any good solution to this. 

I'm very certain that a lot of code will break with that. It's not rare 
to see foo.addEventListener({handleEvent:function(e){do stuff}});.

Similar stuff is done for namespace resolvers. Note that last time I 
tried DOM 3 XPath in Mozilla, I was able to give it a NSResolver that 
was purely user-defined and it liked it.

> Anyway, I'm away on vacation for 3 weeks so I'll have to pick this up
> after I get back. Thanks for the input so far everyone!

Have fun!

-- 
Robin Berjon

Received on Wednesday, 11 August 2004 18:55:23 UTC