Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

jslint_com · This group has moved to Google Plus.

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 584
  • Category: JavaScript
  • Founded: Mar 7, 2008
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 3064 - 3094 of 3202   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3064 From: "douglascrockford" <douglas@...>
Date: Mon Oct 22, 2012 4:53 pm
Subject: Re: Node not defined
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, Joshua Bell <inexorabletash@...> wrote:
>
> On Thu, Oct 18, 2012 at 12:03 AM, douglascrockford <douglas@...>wrote:
>
> > **
> >
> >
> > --- In jslint_com@yahoogroups.com, Ian Toltz <itoltz@> wrote:
> >
> > > I get the error
> > >
> > > 'Node' was used before it was defined.
> > >
> > > From the line:
> > >
> > > if (nodes[i].nodeType === Node.TEXT_NODE) {
> > >
> > > I do have the "Assume a browser" option on.
> > >
> > > I believe this to be in error, as Node is one of the pre-defined objects
> > in
> > > JS (at least in a browser, not sure if that's the case in other
> > > environments) like Math.
> >
> > Can you please cite the relevant standard?
> >
> >
> Since the original poster hasn't replied:
>
> http://www.w3.org/TR/DOM-Level-3-Core/core.html
>
> That spec - which so far as I know is implemented by all the current
> browsers - introduces a rather large number of new global objects into the
> browser. And that spec is not alone, given the rapid pace of browser
> evolution at the moment.


That document describes a rather large number of interfaces, which may be
interesting in the abstract because JavaScript, as you know, does not have
interfaces.

Can you please identify a standard that makes these things global or properties
of the window object?

#3065 From: Joshua Bell <inexorabletash@...>
Date: Tue Oct 23, 2012 12:01 am
Subject: Re: [jslint] Re: Node not defined
inexorabletash
Send Email Send Email
 
On Mon, Oct 22, 2012 at 9:53 AM, douglascrockford <douglas@...>wrote:

> **
>
>
> --- In jslint_com@yahoogroups.com, Joshua Bell <inexorabletash@...> wrote:
> >
> > On Thu, Oct 18, 2012 at 12:03 AM, douglascrockford <douglas@...>wrote:
> >
> > > **
>
> > >
> > >
> > > --- In jslint_com@yahoogroups.com, Ian Toltz <itoltz@> wrote:
> > >
> > > > I get the error
> > > >
> > > > 'Node' was used before it was defined.
> > > >
> > > > From the line:
> > > >
> > > > if (nodes[i].nodeType === Node.TEXT_NODE) {
> > > >
> > > > I do have the "Assume a browser" option on.
> > > >
> > > > I believe this to be in error, as Node is one of the pre-defined
> objects
> > > in
> > > > JS (at least in a browser, not sure if that's the case in other
> > > > environments) like Math.
> > >
> > > Can you please cite the relevant standard?
> > >
> > >
> > Since the original poster hasn't replied:
> >
> > http://www.w3.org/TR/DOM-Level-3-Core/core.html
> >
> > That spec - which so far as I know is implemented by all the current
> > browsers - introduces a rather large number of new global objects into
> the
> > browser. And that spec is not alone, given the rapid pace of browser
> > evolution at the moment.
>
> That document describes a rather large number of interfaces, which may be
> interesting in the abstract because JavaScript, as you know, does not have
> interfaces.
>
> Can you please identify a standard that makes these things global or
> properties of the window object?
>
>
That would be the ECMAScript binding of WebIDL:

http://dev.w3.org/2006/webapi/WebIDL/#ecmascript-binding

Web standards typically define IDL fragments and by reference to WebIDL,
interfaces in these fragments are exposed as properties of the ECMAScript
environment.


[Non-text portions of this message have been removed]

#3066 From: "cse_html_validator" <alhome@...>
Date: Tue Nov 13, 2012 10:06 pm
Subject: Unrecognized tags
cse_html_val...
Send Email Send Email
 
Is there a way to get JSLint to recognize new tags via an option?

I have a customer who can't make as good use of JSLint in CSE HTML Validator
because it is aborting on a tag it doesn't like, but the user is sure they want
to use that tag, for now anyway.

I searched this forum and the documentation and couldn't find anything.

#3067 From: "douglascrockford" <douglas@...>
Date: Tue Nov 13, 2012 10:08 pm
Subject: Re: Unrecognized tags
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "cse_html_validator" <alhome@...> wrote:
>
> Is there a way to get JSLint to recognize new tags via an option?
>
> I have a customer who can't make as good use of JSLint in CSE HTML Validator
because it is aborting on a tag it doesn't like, but the user is sure they want
to use that tag, for now anyway.


What tag?

#3068 From: "cse_html_validator" <alhome@...>
Date: Thu Nov 15, 2012 10:47 pm
Subject: Re: Unrecognized tags
cse_html_val...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
> What tag?
>

The "marquee" tag. Yes, it's a "bad" tag, and I've suggested they use the CSS
marquee properties instead, but I suspect they would prefer to address more
serious issues first, and leave this for later while still being able to use
JSLint.

I do not think JSLint should abort/stop when it finds an unknown tag. It seems a
bit severe.

I think that an option to allow user specified tags would be of practical use
for some.

#3069 From: "Owen" <eclipsechasers2@...>
Date: Fri Nov 16, 2012 3:31 pm
Subject: Script Tag Descending From Fieldset
eclipsechasers2
Send Email Send Email
 
While using jslint on some html with inline script, I run into the following
error:
A '<script>' must be within '< body div frame head iframe p pre span >'.
Jslint halts immediately when detecting this problem.

A much abridged version of my html is:
<html>
<head> … </head>
<body>
<form>
<fieldset>
<legend> … </legend>
<script> …

This code does seem to be valid html.
Is there any reason (standards, style, whatever) that jslint requires that
script tags should not descend from fieldset tags in addition to the others
which it permits?

#3070 From: "douglascrockford" <douglas@...>
Date: Sun Nov 18, 2012 2:21 am
Subject: Re: Script Tag Descending From Fieldset
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "Owen" <eclipsechasers2@...> wrote:
>
> While using jslint on some html with inline script, I run into the following
error:
> A '<script>' must be within '< body div frame head iframe p pre span >'.
> Jslint halts immediately when detecting this problem.
>
> A much abridged version of my html is:
> <html>
> <head> … </head>
> <body>
> <form>
> <fieldset>
> <legend> … </legend>
> <script> …
>
> This code does seem to be valid html.
> Is there any reason (standards, style, whatever) that jslint requires that
script tags should not descend from fieldset tags in addition to the others
which it permits?


Why do you want to put a script in a fieldset?

#3071 From: "douglascrockford" <douglas@...>
Date: Sun Nov 18, 2012 2:23 am
Subject: option.cap
douglascrock...
Send Email Send Email
 
The Tolerate HTML Case option was one of the first options added to JSLint. HTML
tags were originally written in upper case, but tastes changed and now they are
written in lower case.

The option was added to help manage the transition. But that was over a decade
ago. I think it is time to remove the option.

Is anyone still relying on it?

#3072 From: "douglascrockford" <douglas@...>
Date: Sun Nov 18, 2012 2:55 am
Subject: Re: Unrecognized tags
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "cse_html_validator" <alhome@...> wrote:

> --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@> wrote:
> >
> > What tag?
> >
>
> The "marquee" tag. Yes, it's a "bad" tag, and I've suggested they use the CSS
marquee properties instead, but I suspect they would prefer to address more
serious issues first, and leave this for later while still being able to use
JSLint.
>
> I do not think JSLint should abort/stop when it finds an unknown tag. It seems
a bit severe.
>
> I think that an option to allow user specified tags would be of practical use
for some.


Please try it now.

#3073 From: "Owen" <eclipsechasers2@...>
Date: Sun Nov 18, 2012 6:48 am
Subject: Re: Script Tag Descending From Fieldset
eclipsechasers2
Send Email Send Email
 
I am trying to analyze some code I've inherited which does this 20+ times. I can
wrap each of them in divs if need be; that just seems like "busy work", however.
Mostly I asked the question to learn the rationale behind the rule; knowing such
makes it easier to follow going forward.

--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
> --- In jslint_com@yahoogroups.com, "Owen" <eclipsechasers2@> wrote:
> >
> > While using jslint on some html with inline script, I run into the following
error:
> > A '<script>' must be within '< body div frame head iframe p pre span >'.
> > Jslint halts immediately when detecting this problem.
> >
> > A much abridged version of my html is:
> > <html>
> > <head> … </head>
> > <body>
> > <form>
> > <fieldset>
> > <legend> … </legend>
> > <script> …
> >
> > This code does seem to be valid html.
> > Is there any reason (standards, style, whatever) that jslint requires that
script tags should not descend from fieldset tags in addition to the others
which it permits?
>
>
> Why do you want to put a script in a fieldset?
>

#3074 From: "Felix E. Klee" <felix.klee@...>
Date: Sun Nov 18, 2012 9:47 am
Subject: Re: [jslint] option.cap
feklee
Send Email Send Email
 
On Sun, Nov 18, 2012 at 3:23 AM, douglascrockford
<douglas@...> wrote:
> HTML tags were originally written in upper case, but tastes changed
> and now they are written in lower case.

Furthermore, in XHTML tags have to be in lower case:

<http://www.w3.org/TR/xhtml1/#h-4.2>

#3075 From: "jontro123" <jonas@...>
Date: Mon Nov 19, 2012 11:27 am
Subject: var window;
jontro123
Send Email Send Email
 
The following code causes an error in internet explorer:

var window;

"SCRPT5039: Redeclaration of const property line 1 character 1"

For us it would be useful if jslint can detect this case and give us an error if
the assume browser option is checked.

What do you guys think?

#3076 From: "douglascrockford" <douglas@...>
Date: Mon Nov 19, 2012 8:36 pm
Subject: Re: var window;
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "jontro123" <jonas@...> wrote:

> The following code causes an error in internet explorer:
>
> var window;
>
> "SCRPT5039: Redeclaration of const property line 1 character 1"
>
> For us it would be useful if jslint can detect this case and give us an error
if the assume browser option is checked.


It causes no harm on all of the other browsers. I recommend that you report it
to Microsoft instead.

For over a decade we have tried to work around IE's failings. As a result,
Microsoft apparently found little need to fix this stuff. So I won't do it any
more. If something works everywhere except on IE, then let it fail.

Not everyone has the freedom to do that, but I do, and I am exercising that
right as a Programming American.

#3077 From: "cse_html_validator" <alhome@...>
Date: Mon Nov 19, 2012 11:23 pm
Subject: Re: Unrecognized tags
cse_html_val...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
> Please try it now.
>

Great. It doesn't abort/stop anymore.

Thanks.

#3078 From: Joe Hansche <madcoder@...>
Date: Tue Nov 20, 2012 7:26 am
Subject: Re: [jslint] Re: var window;
joeatrr
Send Email Send Email
 
Hallelujah.
On Nov 19, 2012 3:37 PM, "douglascrockford" <douglas@...> wrote:

> **
>
>
> --- In jslint_com@yahoogroups.com, "jontro123" <jonas@...> wrote:
>
> > The following code causes an error in internet explorer:
> >
> > var window;
> >
> > "SCRPT5039: Redeclaration of const property line 1 character 1"
> >
> > For us it would be useful if jslint can detect this case and give us an
> error if the assume browser option is checked.
>
> It causes no harm on all of the other browsers. I recommend that you
> report it to Microsoft instead.
>
> For over a decade we have tried to work around IE's failings. As a result,
> Microsoft apparently found little need to fix this stuff. So I won't do it
> any more. If something works everywhere except on IE, then let it fail.
>
> Not everyone has the freedom to do that, but I do, and I am exercising
> that right as a Programming American.
>
>
>


[Non-text portions of this message have been removed]

#3079 From: "rodobrist" <roderickobrist@...>
Date: Mon Nov 26, 2012 1:59 am
Subject: Array.prototype.reduce
rodobrist
Send Email Send Email
 
Hi guys,

I was coding and I noticed that I often make the same error from using reduce.

e.g.

var options = ['nocaps', 'evil', 'node', 'browser'],
  optionsAsObject = options.reduce(function (options, item) {
   options[item] = true;
  }, {});

// When it should be:
var options = ['nocaps', 'evil', 'node', 'browser'],
  optionsAsObject = options.reduce(function (options, item) {
   options[item] = true;
   return options;
  }, {});

Functions have a default/implied return value of undefined, this means if the
array has more than one item this will throw an error.

I'm suggesting that if the reduce method is invoked with a non primative second
argument and function's first argument has an assignment to its property, there
must be an explicit return value.

e.g.

options.reduce(function (options, item) {
  // first argument is modified
  options[item] = true;

  // Missing return value
}, {}); // reduce is invoked with non primative second argument

Feedback guys?

#3080 From: "douglascrockford" <douglas@...>
Date: Mon Nov 26, 2012 12:51 pm
Subject: Re: Array.prototype.reduce
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@...> wrote:
>
> Hi guys,
>
> I was coding and I noticed that I often make the same error from using reduce.
>
> e.g.
>
> var options = ['nocaps', 'evil', 'node', 'browser'],
>  optionsAsObject = options.reduce(function (options, item) {
>   options[item] = true;
>  }, {});
>
> // When it should be:
> var options = ['nocaps', 'evil', 'node', 'browser'],
>  optionsAsObject = options.reduce(function (options, item) {
>   options[item] = true;
>   return options;
>  }, {});
>
> Functions have a default/implied return value of undefined, this means if the
array has more than one item this will throw an error.
>
> I'm suggesting that if the reduce method is invoked with a non primative
second argument and function's first argument has an assignment to its property,
there must be an explicit return value.
>
> e.g.
>
> options.reduce(function (options, item) {
>  // first argument is modified
>  options[item] = true;
>
>  // Missing return value
> }, {}); // reduce is invoked with non primative second argument


I think the error may be that you are using the wrong method: reduce when you
should forEach.  I am not sure how to test for that.

#3082 From: "rodobrist" <roderickobrist@...>
Date: Mon Nov 26, 2012 11:34 pm
Subject: Re: Array.prototype.reduce
rodobrist
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
> --- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@> wrote:
> >
> > Hi guys,
> >
> > I was coding and I noticed that I often make the same error from using
reduce.
> >
> > e.g.
> >
> > var options = ['nocaps', 'evil', 'node', 'browser'],
> >  optionsAsObject = options.reduce(function (options, item) {
> >   options[item] = true;
> >  }, {});
> >
> > // When it should be:
> > var options = ['nocaps', 'evil', 'node', 'browser'],
> >  optionsAsObject = options.reduce(function (options, item) {
> >   options[item] = true;
> >   return options;
> >  }, {});
> >
> > Functions have a default/implied return value of undefined, this means if
the array has more than one item this will throw an error.
> >
> > I'm suggesting that if the reduce method is invoked with a non primative
second argument and function's first argument has an assignment to its property,
there must be an explicit return value.
> >
> > e.g.
> >
> > options.reduce(function (options, item) {
> >  // first argument is modified
> >  options[item] = true;
> >
> >  // Missing return value
> > }, {}); // reduce is invoked with non primative second argument
>
>
> I think the error may be that you are using the wrong method: reduce when you
should forEach.  I am not sure how to test for that.
>

No, I know when to use each method.

Ill try to give another example, the JSLint source uses a method named
array_to_object, which can be re-written like this:

function array_to_object(array, value) {
  return array.reduce(function (object, key) {
   object[key] = value;
   return object; //I forget this line allot
  }, {});
}

I suspect that the reduce method is used like this commonly, and I often forget
to type the "return object;" statement.

This is why the function passed into array.reduce should have an
explicit return value.

#3083 From: "douglascrockford" <douglas@...>
Date: Mon Nov 26, 2012 11:38 pm
Subject: Re: Array.prototype.reduce
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@...> wrote:
>
>
>
> --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@> wrote:
> >
> > --- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@> wrote:
> > >
> > > Hi guys,
> > >
> > > I was coding and I noticed that I often make the same error from using
reduce.
> > >
> > > e.g.
> > >
> > > var options = ['nocaps', 'evil', 'node', 'browser'],
> > >  optionsAsObject = options.reduce(function (options, item) {
> > >   options[item] = true;
> > >  }, {});
> > >
> > > // When it should be:
> > > var options = ['nocaps', 'evil', 'node', 'browser'],
> > >  optionsAsObject = options.reduce(function (options, item) {
> > >   options[item] = true;
> > >   return options;
> > >  }, {});
> > >
> > > Functions have a default/implied return value of undefined, this means if
the array has more than one item this will throw an error.
> > >
> > > I'm suggesting that if the reduce method is invoked with a non primative
second argument and function's first argument has an assignment to its property,
there must be an explicit return value.
> > >
> > > e.g.
> > >
> > > options.reduce(function (options, item) {
> > >  // first argument is modified
> > >  options[item] = true;
> > >
> > >  // Missing return value
> > > }, {}); // reduce is invoked with non primative second argument
> >
> >
> > I think the error may be that you are using the wrong method: reduce when
you should forEach.  I am not sure how to test for that.
> >
>
> No, I know when to use each method.
>
> Ill try to give another example, the JSLint source uses a method named
> array_to_object, which can be re-written like this:
>
> function array_to_object(array, value) {
>  return array.reduce(function (object, key) {
>   object[key] = value;
>   return object; //I forget this line allot
>  }, {});
> }
>
> I suspect that the reduce method is used like this commonly, and I often
forget to type the "return object;" statement.
>
> This is why the function passed into array.reduce should have an
> explicit return value.


function array_to_object(array) {
     var result = {};
     array.forEach(function (key) {
         result[key] = true;
     });
     return result;
}

#3084 From: "rodobrist" <roderickobrist@...>
Date: Tue Nov 27, 2012 12:28 am
Subject: Re: Array.prototype.reduce
rodobrist
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
>
>
>
> --- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@> wrote:
> >
> >
> >
> > --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@> wrote:
> > >
> > > --- In jslint_com@yahoogroups.com, "rodobrist" <roderickobrist@> wrote:
> > > >
> > > > Hi guys,
> > > >
> > > > I was coding and I noticed that I often make the same error from using
reduce.
> > > >
> > > > e.g.
> > > >
> > > > var options = ['nocaps', 'evil', 'node', 'browser'],
> > > >  optionsAsObject = options.reduce(function (options, item) {
> > > >   options[item] = true;
> > > >  }, {});
> > > >
> > > > // When it should be:
> > > > var options = ['nocaps', 'evil', 'node', 'browser'],
> > > >  optionsAsObject = options.reduce(function (options, item) {
> > > >   options[item] = true;
> > > >   return options;
> > > >  }, {});
> > > >
> > > > Functions have a default/implied return value of undefined, this means
if the array has more than one item this will throw an error.
> > > >
> > > > I'm suggesting that if the reduce method is invoked with a non primative
second argument and function's first argument has an assignment to its property,
there must be an explicit return value.
> > > >
> > > > e.g.
> > > >
> > > > options.reduce(function (options, item) {
> > > >  // first argument is modified
> > > >  options[item] = true;
> > > >
> > > >  // Missing return value
> > > > }, {}); // reduce is invoked with non primative second argument
> > >
> > >
> > > I think the error may be that you are using the wrong method: reduce when
you should forEach.  I am not sure how to test for that.
> > >
> >
> > No, I know when to use each method.
> >
> > Ill try to give another example, the JSLint source uses a method named
> > array_to_object, which can be re-written like this:
> >
> > function array_to_object(array, value) {
> >  return array.reduce(function (object, key) {
> >   object[key] = value;
> >   return object; //I forget this line allot
> >  }, {});
> > }
> >
> > I suspect that the reduce method is used like this commonly, and I often
forget to type the "return object;" statement.
> >
> > This is why the function passed into array.reduce should have an
> > explicit return value.
>
>
> function array_to_object(array) {
>     var result = {};
>     array.forEach(function (key) {
>         result[key] = true;
>     });
>     return result;
> }
>

Ok, thanks Doug. I suppose that construct is less prone to errors.

#3085 From: "sandyhead25" <austin.cheney@...>
Date: Thu Dec 27, 2012 7:20 pm
Subject: Bug in recent JSLint update
sandyhead25
Send Email Send Email
 
There appears to be a new rule that looks for unnecessary parenthesis, but this
rule gets confused when wrapping regex:

var mhtml = true,
     disqualify = (mhtml) ? (/^(\s?<((pre)|(script)))/) : (/^(\s?<script)/);

For safety regular expressions not used in or with a method I typically wrap in
parenthesis because some software can get confused as to where the regular
expression syntax ends.  Everywhere else in my code the excess parenthesis rule
is happy to allow me to wrap regex, except when the regex also contains
parenthesis.

Thanks,
Austin

#3086 From: "douglascrockford" <douglas@...>
Date: Thu Dec 27, 2012 7:32 pm
Subject: Re: Bug in recent JSLint update
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "sandyhead25" <austin.cheney@...> wrote:

> There appears to be a new rule that looks for unnecessary parenthesis, but
this rule gets confused when wrapping regex:
>
> var mhtml = true,
>     disqualify = (mhtml) ? (/^(\s?<((pre)|(script)))/) : (/^(\s?<script)/);
>
> For safety regular expressions not used in or with a method I typically wrap
in parenthesis because some software can get confused as to where the regular
expression syntax ends.  Everywhere else in my code the excess parenthesis rule
is happy to allow me to wrap regex, except when the regex also contains
parenthesis.


I completely agree. It is wise to wrap regexp literals in parens to avoid
syntactic weirdness. But that is not what JSLint is complaining about. Try this:

var mhtml = true,
     disqualify = mhtml ? (/^(\s?<((pre)|(script)))/) : (/^(\s <script)/);

#3087 From: "sandyhead25" <austin.cheney@...>
Date: Fri Dec 28, 2012 4:01 am
Subject: Re: Bug in recent JSLint update
sandyhead25
Send Email Send Email
 
Thank you!

Austin

#3088 From: Matthew Potter <mdpotter@...>
Date: Wed Jan 2, 2013 12:04 am
Subject: Allowance of new HTML5 tags
askmatthewpo...
Send Email Send Email
 
I’ve run into an error that is a bit strange to see. The <summary> tag is not
allowed as it is unrecognized however the <details> tag is allowed. I’ve updated
my own copy of JSLint and Brackets (Addition at line 828: “summary:  {parent: '
details '},”) but this would be a great addition to the project too now that
Chrome and Safari both support it. Although Safari still doesn’t have it within
their official documentation, it does use the same method that Chrome does.

#3089 From: "douglascrockford" <douglas@...>
Date: Wed Jan 2, 2013 1:53 pm
Subject: Re: Allowance of new HTML5 tags
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, Matthew Potter <mdpotter@...> wrote:
>
> I've run into an error that is a bit strange to see. The <summary> tag is not
allowed as it is unrecognized however the <details> tag is allowed. I've updated
my own copy of JSLint and Brackets (Addition at line 828: "summary:  {parent: '
details '},") but this would be a great addition to the project too now that
Chrome and Safari both support it. Although Safari still doesn't have it within
their official documentation, it does use the same method that Chrome does.


Thanks. Please try it now.

#3090 From: "george_weilenmann" <abyssoft@...>
Date: Thu Jan 10, 2013 5:48 am
Subject: CSS * selector throws error when in style block
george_weile...
Send Email Send Email
 
Unexpected '*'.

Rationale for acceptance:

The * selector in CSS, also known as the universal selector, is useful for
setting styling to the full array of possible tags and all descendants of an
ancestor without having to be verbose about the DOM tree involved.

One common use is
* {font-family:<fonts>;}

Restrictions that are reasonable
When naked the * selector should be the 1st line within a style block, as this
applies to all elements regardless of location in the DOM tree. When clothed the
* may not be the first selector indicated unless html is the second (this is to
accommodate common CSS hacks for IE, yes we all hate that blasted bane.)

invalid: * <additional selector(s) except html>
valid: * html {css hacks}
valid: body * {}

#3091 From: "george_weilenmann" <abyssoft@...>
Date: Sat Jan 12, 2013 6:06 am
Subject: Re: CSS * selector throws error when in style block
george_weile...
Send Email Send Email
 
Would also like to see CSS 3.0 style attributes added as modern browsers now
support them. And those that don't can have graceful fallback.

#3092 From: "douglascrockford" <douglas@...>
Date: Mon Jan 14, 2013 9:55 pm
Subject: Re: CSS * selector throws error when in style block
douglascrock...
Send Email Send Email
 
--- In jslint_com@yahoogroups.com, "george_weilenmann"  wrote:
>
> Would also like to see CSS 3.0 style attributes added as modern browsers now
support them. And those that don't can have graceful fallback.


Can you be more specific?

#3093 From: "george_weilenmann" <abyssoft@...>
Date: Tue Jan 15, 2013 6:59 am
Subject: Re: CSS * selector throws error when in style block
george_weile...
Send Email Send Email
 
Directives Missing
@media
@keyframes FF 16+, IE 10, Opera 12.10; Chrome, Android, Safari 4, Opera 12, with
prefix,
@import [url] list-of-media-queries  the @import works currently only for [url],
list-of-media-queries aids in RWD.
@page used to make printing style adjustment most useful for printable material.
While there are a few others they do not yet have widespread support and are
considered experimental or highly experiemental


Selectors missing

* universal
E[attr|="val"] attribute contains hyphenated values example span tag with lang
attribute having value en-us
:only-child pseudo
:lang(fr) `this one looks like it has some support in JSLint but is buggy when
you have language code present it throws 'Expected ')' and instead saw 'fr'.'
and when missing states expected language code.`
all 4 pseudo elements ::first-line ::first-letter ::before ::after

E ~ F sibling selector

CSS 3 Missing properties
Multiple values on
background-image & background-position, strangely background-origin already
supports this in JSLint.
background-repeat, additionally the values round and space throw an error.

CSS 3 values

calc is either fully supported or supported with prefix. This one being quite
useful for some styles of RWD.
hsl(0-360, 0-100%, 0-100%) & hsla(0-360, 0-100%, 0-100%, 0.0-1.0) both have
support in modern browsers.
CSS Gradients (specs http://www.w3.org/TR/css3-images/#gradients)
rem units for length (spec http://www.w3.org/TR/css3-values/#rem-unit)

Prefixes
While prefixes are not an Ideal, they do allow for experimentation and
presenting more advanced items where supported. FF finally adopted the -webkit-
in conjunction with -moz- prefix; again graceful failure can be done here. Top 4
prefixes in use are -webkit-, -ms-, -moz-, -o- listed current market share order
as listed in the use log of Wikimedia Oct 2012.

That looks like a good start. As time permits I will look for others that are
currently missing support / under-supported / have errors.

Thank you.

#3094 From: Luke Page <luke.a.page@...>
Date: Fri Jan 18, 2013 9:28 am
Subject: regex parsing - [^]
page.luke...
Send Email Send Email
 
Hi,

My colleague was linting this and getting an error

var a = /<.+>[^]<.+>/;

Unescaped '^'.

He argued that [^] was a valid succinct way of saying "any character"
rather than [.\n\r]* or [\s\S]*

What do you think?

Regards,

Luke


[Non-text portions of this message have been removed]

Messages 3064 - 3094 of 3202   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

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