- This topic has 4 replies, 3 voices, and was last updated 17 years, 3 months ago by jyutzler.
-
AuthorPosts
-
Jonathan FeinbergMemberIs there any way to disable the bogus JavaScript warning “A dot following a number can be confused with a decimal point”?
var dialog = new YAHOO.widget.SimpleDialog("internalError", { **** effect: {effect:YAHOO.widget.ContainerEffect.FADE, duration: 0.25}, fixedcenter:true, modal:true, draggable:false });
(The flagged line is marked with ****).
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GAThanks.
Riyad KallaMemberMrFeinberg,
I believe it just wants you to quote the value, that will make it happy.
Jonathan FeinbergMember@support-rkalla wrote:
I believe it just wants you to quote the value, that will make it happy.
Why would I want to quote a numeric literal? The ECMAScript spec says that an object literal is
ObjectLiteral : {} { PropertyNameAndValueList } PropertyNameAndValueList : PropertyName : AssignmentExpression PropertyNameAndValueList , PropertyName : AssignmentExpression PropertyName : Identifier StringLiteral NumericLiteral AssignmentExpression : ConditionalExpression LeftHandSideExpression AssignmentOperator AssignmentExpression
And ConditionalExpression ultimately bottoms out in
PrimaryExpression : this Identifier Literal ArrayLiteral ObjectLiteral ( Expression )
where Literal includes numeric literals. So, seeing as my syntax is good, why would I want to use the wrong type? I believe this is a bug in the validator, plain and simple.
Riyad KallaMemberMy appologies, I agree it looks to be a bug, I was trying to find a quick workaround for you.
jyutzlerMemberYet here we are in version 5.5.1 and we still have this stupid warning, yet the validator still can’t identify an extraneous comma that makes IE collapse in a heap. It makes me wonder if we are in 2007 or 1977.
-
AuthorPosts