Search the web
Sign In
New User? Sign Up
jslint_com · JSLint.com
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 700 - 729 of 993   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
700
I always use the plusplus option, so I never noticed that when it is off there is no checking of the operand of ++. JSLint now complains if the operand is not...
Douglas Crockford
douglascrock...
Offline Send Email
Jul 1, 2009
10:38 pm
701
Would you be able to use a brief example of code so that we could see such an occurrence in the context you are referencing?...
sandyhead25
Offline Send Email
Jul 2, 2009
12:47 am
702
... --1; f()++; --a--; ++(a + b);...
Douglas Crockford
douglascrock...
Offline Send Email
Jul 2, 2009
1:03 am
703
... Could you please update http://www.jslint.com/jslint.js ? It is still showing 2009-06-17 edition. Harry....
Merlin
harry152566
Offline Send Email
Jul 2, 2009
6:28 pm
704
... This thread implies the increment or decrement operator in the general sense, so I was clearly reading too much into the question. I would say this is...
sandyhead25
Offline Send Email
Jul 4, 2009
11:54 pm
705
... Why would you use typeof(console) === "undefined" instead of console === undefined which should be the same thing, but faster?...
sandyhead25
Offline Send Email
Jul 5, 2009
12:33 pm
706
... if (console === undefined) // could raise ReferenceError if console is not defined if (typeof console === 'undefined') // is safer, tests for the type of...
marcelduran
Offline Send Email
Jul 6, 2009
3:03 am
707
... You seem to have confused the result of the test for the operations imposed within the test decision. The typeof operator only tests for the type of the...
sandyhead25
Offline Send Email
Jul 7, 2009
11:16 pm
708
... No, typeof works on expressions (more precisely UnaryExpressions), including variables and object properties. That means it will also work on implicit...
crlender
Offline Send Email
Jul 8, 2009
1:03 am
709
right, but my point was: "if (console === undefined)" only works when console variable is defined. [Non-text portions of this message have been removed]...
Marcel Duran
marcelduran
Offline Send Email
Jul 8, 2009
1:10 am
710
Title says it all: removeEventListener("click", function () {}, false);...
pauanyu
Offline Send Email
Jul 8, 2009
3:15 pm
711
... Thanks. Please let me know if you find any more of those....
Douglas Crockford
douglascrock...
Offline Send Email
Jul 8, 2009
5:42 pm
712
There is a common pattern in Ajax libraries now to keep a single object that contains the library's stuff. Since the library may be distributed over several...
Douglas Crockford
douglascrock...
Offline Send Email
Jul 8, 2009
6:26 pm
713
Correction: this.hasOwnProperty(name)...
Douglas Crockford
douglascrock...
Offline Send Email
Jul 8, 2009
11:04 pm
714
I have created a small launcher script for JavaScript Core (Safari's Nitro JavaScript Engine) It gives Mac users the ability to run JSLint from the command...
pulletsforever
Offline Send Email
Jul 9, 2009
1:20 am
715
... No, because if the variable is defined then "if (console === undefined)" will not work, or rather it will evaluate to false. If console is defined then...
sandyhead25
Offline Send Email
Jul 9, 2009
2:02 am
716
by "work" I meant "will evaluate the expression" not the result itself.again: if console is not defined, your test, if (console === undefined) will raise a...
Marcel Duran
marcelduran
Offline Send Email
Jul 9, 2009
2:37 am
717
... What about: var NAMESPACE; if (typeof NAMESPACE !== "object") { NAMESPACE = {}; } True, a falsy check is generally good enough; I'm talking about a...
pauanyu
Offline Send Email
Jul 9, 2009
3:02 am
718
I understand that the ?: operator is supposed to be used to select between multiple values, rather than multiple actions. I ran into an interesting situation:...
pauanyu
Offline Send Email
Jul 9, 2009
3:12 am
719
... I did not say the test was incorrect. I only said it was inefficient and likely did not accomplish what he expected. ... Unary operators are typically...
sandyhead25
Offline Send Email
Jul 9, 2009
3:27 am
720
... I have discovered the root of this complication. If a variable is declared but not assigned or not used this text works perfectly fine. If the variable...
sandyhead25
Offline Send Email
Jul 9, 2009
3:35 am
721
Well, val1 and val2 are the only possible values, you could do this: var next = {}; next[val1]=val2; next[val2]=val1; return this[prop] = next[this[prop]] ; If...
Michael Lorton
mlorton
Online Now Send Email
Jul 9, 2009
3:42 am
722
... That seems to be a good solution as well. However, that was not the question. I was indeed talking about the ?: operator, specifically about a JSLint error...
pauanyu
Offline Send Email
Jul 9, 2009
4:10 am
723
... Firefox. If the ECMA standard is in disagreement with me >then Firefox's interpretation of JavaScript is nonstandard or the standard is wrong. Wow ! Be...
Alexandre Morgaut
morgaut_a
Online Now Send Email
Jul 9, 2009
10:05 am
724
... The thing that JSLint did not like was the use of an assignment as an expression. It will accept this[prop] = (this[prop] === val1) ? val2 : (this[prop]...
Douglas Crockford
douglascrock...
Offline Send Email
Jul 9, 2009
1:11 pm
725
... They're not. ... They don't. ... types were objects, typeof would return "object" for each of them, and would be quite useless. typeof "" -->...
crlender
Offline Send Email
Jul 9, 2009
2:56 pm
726
... Oh, I see! So this works: return (this[prop] = (this[prop] === val1) ? val2 : (this[prop] === val2) ? val1 : this[prop]); Thanks for your help. Nice to...
pauanyu
Offline Send Email
Jul 9, 2009
3:31 pm
727
... I did a little tinkering, and here's what I came up with: return (this[prop] = ({ val1: val2, val2: val1 })[this[prop]]); What a fantastic construct....
pauanyu
Offline Send Email
Jul 9, 2009
4:38 pm
728
Yeah, I did exactly that first too, but { val1 : val2 } is equivalent to { "val1" : val2 }. The braces notation only works if the sequence is expressed as...
Michael Lorton
mlorton
Online Now Send Email
Jul 9, 2009
5:41 pm
729
... They why are unary operators frowned upon by the jslint tool? ... Operators require something to act upon. ... Functions are objects. Types are derived...
sandyhead25
Offline Send Email
Jul 9, 2009
9:57 pm
Messages 700 - 729 of 993   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help