Prev: FAQ Entry Proposal: What is (function(){ /*...*/ })() ?
Next: FAQ Topic - What is Ajax? (2010-03-01)
From: lorlarz on 1 Mar 2010 11:22 On Mar 1, 8:43 am, lorlarz <lorl...(a)gmail.com> wrote: > On Mar 1, 12:04 am, lorlarz <lorl...(a)gmail.com> wrote:> On Feb 28, 9:09 pm, lorlarz <lorl...(a)gmail.com> wrote: > > [snip] > > For convenience, I thought it would be good to just refer to ONE file > (one document) regarding all the changes I needed to make to get > jQuery 1.4.2 all the way through JSLint **_AND_** the remaining > errors found (in particular, their line numbers) NOW referring to the > SAME jQuery 1.4.2 Development Verson (obtainable fromhttp://jquery.ocm > ). > > OK. Here it is. Directions: Simply make the following changes to > the Development version of jQuery 1.4.2 : > > 2649 changed to: var origContext = context || document; // = contents > before = contents removed > > lines 2663 to 2673 commented out > > 2985 changed to: var nodeCheck = part.toLowerCase(); // = part > before = part removed > > 2995 changed to: var nodeCheck = part.toLowerCase(); // = part before > = part removed > > 3317 changed to Expr.match[ type ] = new > RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]* > \))/.source) ); // parentheses added on expression after + sign > > 4167 commented out > > 4775 commented out > > 5994 prevOffsetParent = offsetParent; offsetParent = > elem.offsetParent; // (comma in middle changed to semi-colon) > > 6035 checkDiv.style.position = "fixed"; checkDiv.style.top = > "20px"; // (comma in middle changed to semi-colon) > > 6040 innerDiv.style.overflow = "hidden"; innerDiv.style.position = > "relative"; // (comma in middle changed to semi-colon) > [snip] The problems I would _really_ like to see addressed are what JSLInt saw as *big problems* and I did not correct, but rather commented out to even get through jQuery 1.4.2 with JSLint . Below are the 3 bits of code I had to comment out.: The block I had to comment out: (all line no. now refer to development version of jQuery 1.4.2 , as provided by http://jquery.com ): lines 2663 to 2673 /* while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { soFar = m[3]; parts.push( m[1] ); if ( m[2] ) { extra = m[3]; break; } } */ and line 4167: // replace(/=([^="'>\s]+\/)>/g, '="$1">') and line 4775: // jsre = /=\?(&|$)/, How big are these problems? Can they be viewed as benign? I sure do NOT know.
From: lorlarz on 1 Mar 2010 11:41 On Mar 1, 12:00 am, David Mark <dmark.cins...(a)gmail.com> wrote: > lorlarz wrote: > [snip] > > > 2985 changed to: var nodeCheck = part.toLowerCase(); // = part > > before = part removed > > > 2995 changed to: var nodeCheck = part.toLowerCase(); // = part before > > = part removed > > Huh? [snip] Here's what I mean: There were 2 cases in which they had the following): var nodeCheck = part = part.toLowerCase(); There where 2 other exactly similar cases other than the 2 of those. Pretty much makes it unlikely any JSLint report was ever looked at.
From: lorlarz on 1 Mar 2010 11:53 On Mar 1, 12:00 am, David Mark <dmark.cins...(a)gmail.com> wrote: > lorlarz wrote: [snip] > > 2985 changed to: var nodeCheck = part.toLowerCase(); // = part > > before = part removed > > 2995 changed to: var nodeCheck = part.toLowerCase(); // = part before > > = part removed > Huh? [snip] Here's what I mean: There were 2 cases in which they had the following): (JSLInt considered this too big a problem to continue BUT since toLowercase() does not alter the string it is applied to but returns a modified copy, it is possibly what is wanted. Makes me wonder if JSLInt is not a bit "wack" on this): var nodeCheck = part = part.toLowerCase(); There where 2 other exactly similar cases other than the 2 of those.
From: lorlarz on 1 Mar 2010 12:08 On Mar 1, 10:53 am, lorlarz <lorl...(a)gmail.com> wrote: > On Mar 1, 12:00 am, David Mark <dmark.cins...(a)gmail.com> wrote: > > > lorlarz wrote: > > [snip] > > > > 2985 changed to: var nodeCheck = part.toLowerCase(); // = part > > > before = part removed > > > 2995 changed to: var nodeCheck = part.toLowerCase(); // = part before > > > = part removed > > Huh? > > [snip] > > Here's what I mean: > > There were 2 cases in which they had the following): > (JSLInt considered this too big a problem to continue BUT > since toLowercase() does not alter the string it is applied > to but returns a modified copy, it is possibly what is wanted. > Makes me wonder if > JSLInt is not a bit "wack" on this): > > var nodeCheck = part = part.toLowerCase(); > > There where 2 other exactly similar cases other than the 2 of those. P.S. To my last post (sorry): The things of concern to me among the remaining 'errors' in the JSLint report, these seem to be the most worrisome: Problem at line 2989 character 61: 'nodeCheck' used out of scope. checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); --------------- Problem at line 2999 character 66: 'nodeCheck' used out of scope. checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); -------------- Problem at line 4628 character 13: Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function. function getWH() { --------------- Problem at line 5052 character 41: Bad operand. if ( s.global && ! jQuery.active++ ) {
From: lorlarz on 1 Mar 2010 12:11
On Mar 1, 10:22 am, lorlarz <lorl...(a)gmail.com> wrote: > On Mar 1, 8:43 am, lorlarz <lorl...(a)gmail.com> wrote: > > > > > On Mar 1, 12:04 am, lorlarz <lorl...(a)gmail.com> wrote:> On Feb 28, 9:09 pm, lorlarz <lorl...(a)gmail.com> wrote: > > > [snip] > > > For convenience, I thought it would be good to just refer to ONE file > > (one document) regarding all the changes I needed to make to get > > jQuery 1.4.2 all the way through JSLint **_AND_** the remaining > > errors found (in particular, their line numbers) NOW referring to the > > SAME jQuery 1.4.2 Development Verson (obtainable fromhttp://jquery.ocm > > ). > > > OK. Here it is. Directions: Simply make the following changes to > > the Development version of jQuery 1.4.2 : > > > 2649 changed to: var origContext = context || document; // = contents > > before = contents removed > > > lines 2663 to 2673 commented out > > > 2985 changed to: var nodeCheck = part.toLowerCase(); // = part > > before = part removed > > > 2995 changed to: var nodeCheck = part.toLowerCase(); // = part before > > = part removed > > > 3317 changed to Expr.match[ type ] = new > > RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]* > > \))/.source) ); // parentheses added on expression after + sign > > > 4167 commented out > > > 4775 commented out > > > 5994 prevOffsetParent = offsetParent; offsetParent = > > elem.offsetParent; // (comma in middle changed to semi-colon) > > > 6035 checkDiv.style.position = "fixed"; checkDiv.style.top = > > "20px"; // (comma in middle changed to semi-colon) > > > 6040 innerDiv.style.overflow = "hidden"; innerDiv.style.position = > > "relative"; // (comma in middle changed to semi-colon) > > [snip] > > The problems I would _really_ like to see addressed are what > JSLInt saw as *big problems* and I did not correct, but rather > commented out to even get through jQuery 1.4.2 with JSLint . > Below are the 3 bits of code I had to comment out.: > > The block I had to comment out: (all line no. now refer to > development > version of jQuery 1.4.2 , as provided byhttp://jquery.com): > > lines 2663 to 2673 > > /* while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { > soFar = m[3]; > > parts.push( m[1] ); > > if ( m[2] ) { > extra = m[3]; > break; > } > } > */ > > and > > line 4167: > > // replace(/=([^="'>\s]+\/)>/g, '="$1">') > > and > > line 4775: > > // jsre = /=\?(&|$)/, > > How big are these problems? Can they be viewed as benign? > I sure do NOT know.- Hide quoted text - > > - Show quoted text - P.S. To my above quoted post (sorry): The things of concern to me among the remaining 'errors' in the JSLint report, these seem to be the most worrisome: Problem at line 2989 character 61: 'nodeCheck' used out of scope. checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); --------------- Problem at line 2999 character 66: 'nodeCheck' used out of scope. checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); -------------- Problem at line 4628 character 13: Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function. function getWH() { --------------- Problem at line 5052 character 41: Bad operand. if ( s.global && ! jQuery.active++ ) { |