It depends on whether or not the calling function was expecting a result. In the case of browser events, the method should always return either a true or a false.
For methods such as specificCreate and the like, they are not requiring a return value because the calling code does not expect one. I know that this probably occurs throughout the code. I just noticed it when the specific line was discussed. Richard Bennett wrote: > Hi, > I'd be quite happy to change that if needed, but I was under the impression > that > if(bool)return > was quite valid syntax, not returning any value, but terminating the script > at that point. > It has also been used extensively throughout DynAPI, just in keyboard.js 5 > times, and the check: > if(!this.elm) return > is prevalent throughout DynAPI. > Are you saying they are all invalid, or that in this case you think the > browser is expecting a value to be returned? > > Cheers, > Richard. > www.richardinfo.com > > ----- Original Message ----- > From: "Michael Pemberton" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, October 28, 2001 1:59 AM > Subject: [Dynapi-Dev] Keyboard events fix > > > Is there any reason why the new keyboard code was just return without a > > value? If something is not false, then it must be true. > > > > I have found that some browsers are confused by a null return when it is > > expecting a value. I suggest that the code be changed to read as > > follows: > > > > Line 35: if (!realsrc) return true; > > > > I have done this in my own version without any problems. > > -- > > Michael Pemberton > > [EMAIL PROTECTED] > > ICQ: 12107010 > > > > > > > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > [EMAIL PROTECTED] > > http://www.mail-archive.com/[email protected]/ > > > > _______________________________________________ > Dynapi-Dev mailing list > [EMAIL PROTECTED] > http://www.mail-archive.com/[email protected]/ -- Michael Pemberton [EMAIL PROTECTED] ICQ: 12107010 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[email protected]/
