logo       

Re: Re: getSelectedNode revisited: msg#00002

web.kupu.devel

Subject: Re: Re: getSelectedNode revisited

yuppie wrote:

Sounds reasonable. But *if* the behavior of getSelectedNode is defined that way, it does exactly the same as IEs parentElement method does. (For IE TextRange objects getSelectedNode just calls that method.)

Indeed it seems to do so: I just added 'this.getSelectedNode = this.parentElement' to both Selection classes, and the IE tests work like a charm... The Moz ones unfortunately don't, so it looks like we've now discovered an inconsistency between those methods...

I think getting the parentElement of MozillaSelection to do exactly the same as that of IESelection and then having getSelectedNode as a deprecated alias of that method wouldn't be a bad idea, since that would solve a lot of redundancy, and also gets rid of the wrong name at the same time (perhaps we should show a debug message 'this method is deprecated' or something when getSelectedNode() is called).

Of course this will require thorough investigation.

Cheers,

Guido


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise