Questions tagged [ecma262]

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript.

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript. For complete reference read the standard it self at: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

145 questions
1
vote
0 answers

Is this valid automatic semicolon insertion?

I've been fiddling with JavaScript, and I found some behavior I don't understand. The problem seems to be with automatic semicolon insertion (ASI), but, to me, it looks like ASI is misbehaving. The following code has been tested with node v8.10, and…
1
vote
1 answer

ECMA 262/Perl 5 regexp support in java

Are there any libraries that supports this regexp-specification in java? Know the Mozilla Rhino uses this specification, but how can this be implemented in java? UPDATE: Found a library called jakarta-oro that supports perl5-regular expression which…
jorgen.ringen
  • 1,285
  • 5
  • 14
  • 20
1
vote
1 answer

What differences are between javascript in Firefox 4 and IE9

IE9 supports ecma-262 edition 5 (http://en.wikipedia.org/wiki/ECMAScript) and Firefox 4 is javascript 1.8.5 (https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8.5). How compliant is IE9 with ECMA-262 edition 5 and is that the same as…
James Black
  • 41,583
  • 10
  • 86
  • 166
1
vote
0 answers

Is a decimal digit after the '\' symbol in string allowed in ECMA-262 strict mode?

According to the 6th edition of the ECMA-262 specification in strict mode in single or double quoted strings after '\' it is possible to have EscapeSequence or LineTerminatorSequence and EscapeSequence must be one of the following:…
1
vote
1 answer

What's the difference between VarDeclaredNames and VarScopedDeclarations?

I'm reading EcmaScript specification. At 9.2.12, there are: 11.Let varNames be the VarDeclaredNames of code. 12.Let varDeclarations be the VarScopedDeclarations of code. And at 13.1.5 and 13.1.6: 13.1.5 Static Semantics:…
SmallTown NE
  • 543
  • 1
  • 7
  • 25
1
vote
0 answers

Is Firefox technically correct in function hoisting within if statements with latest ECMA?

I learned that the following does not work in FF and does in every other standard browser. if(jQuery){ importantScript(); function importantScript(){ console.log("this is important"); }; } This is because FF does not hoist…
notthehoff
  • 1,172
  • 1
  • 12
  • 28
1
vote
1 answer

getOwnPropertyNames ignores __proto__ on Firefox

__proto__ is a property of Object.prototype: Object.prototype.hasOwnProperty('__proto__'); // true However, getOwnPropertyNames ignores it on Firefox: Object.getOwnPropertyNames(Object.prototype).indexOf('__proto__'); // -1 It works on Chromium 43…
Oriol
  • 274,082
  • 63
  • 437
  • 513
1
vote
2 answers

from ObjectiveC to ECMAscript

Going thru the excellent Apress books on Objective C. To help in my undertanding, I try and recode any Ojective C code samples in Java/Action-script. One common structure in method calls in ObjC leaves me a bit puzzled. -(id) initWithPressure:…
Bachalo
  • 6,965
  • 27
  • 95
  • 189
1
vote
1 answer

Confused with ECMAScript Language Specification Function Calls section

I am reading ECMAScript Language Specification Function Calls section Can someone rephrase or detailed explains the following sentense for me? The production CallExpression : MemberExpression Arguments is evaluated as follows: Evaluate…
nandin
  • 2,549
  • 5
  • 23
  • 27
1
vote
1 answer

How to configure NSRegularExpression to be compatible with ECMA-262

I need to be ECMA-262 regex compliant and NSRegularExpression is ICU regex compliant. According to Wikipedia, there are a few difference between the two. - are there any NSRegularExpression NSMatchingOptions or options I can pass to make…
Sam
  • 3,453
  • 1
  • 33
  • 57
1
vote
1 answer

ignore sub-pattern matching notation in c++11

On page 1056 in the 4th edition of The C++ Programming language, Stroustrup says the ignoring sub-patterns token is (?, however in boost::regex it is (?:. I suspect Stroustrup might be wrong, can anyone with a copy of the standard say?
Polymer
  • 1,043
  • 11
  • 13
1
vote
2 answers

JavaScript function pointer scope

This is an academic question concerning javascript. The code segment below takes an array of integers, and returns an array of pointers to functions. The functions pointed to are suppose to return the squared value of the array. If the input was…
John b
  • 1,338
  • 8
  • 16
1
vote
1 answer

Are Arrays as lvalues in JavaScript ECMAScript-compliant?

Firefox 3.5.3 (at least) allows me to write code like : var array = [4, 5, 6]; var foo, bar, baz; [foo, bar, baz] = array; at which point foo => 4 bar => 5 baz => 6 which can be quite helpful for code clarity. Is that considered…
TieDyeFriday
  • 135
  • 5
1
vote
2 answers

Is there a better C# ECMAScript engine than ScriptControlClass?

Implementing the ScriptControlClass was extremely easy, unfortunately the side effects with the language implementation is really starting to worry me. The goal was to have a language that was the same as the browser's JavaScript. However, I am…
Shire
  • 639
  • 1
  • 14
  • 28
1
vote
2 answers

How does the ECMA Script 5 spec allow successful parses for hex ints greater than 0xFF?

In EMCA262 version 5.1 the definition of a hexadecimal integer literal is: (document page 20, PDF page 32) HexIntegerLiteral ::     0xHexDigit     0XHexDigit     HexIntegerLiteral HexDigit HexDigit :: one of     0 1 2 3 4 5 6 7 8 9…
Matt Ellen
  • 11,268
  • 4
  • 68
  • 90