ecma262

Why was the arguments.callee.caller property deprecated in JavaScript?

Why was the arguments.callee.caller property deprecated in JavaScript? It was added and then deprecated in JavaScript, but it was omitted altogether by ECMAScript. Some browser (Mozilla, IE) have always supported it and don't have any plans on the map to remove support. Others (Safari, Opera) have adopted support for it, but support o...

What is the scope of a function in Javascript/ECMAScript?

Hello Javascript experts Today I had a discussion with a colleague about nested functions in Javascript: function a() { function b() { alert('boo') } var c = 'Bound to local call object.' d = 'Bound to global object.' } In this example, trials point out that b is not reachable outside the body of a, much like c is. ...

Relation between [[Prototype]] and prototype in JavaScript

From http://www.jibbering.com/faq/faq_notes/closures.html : Note: ECMAScript defines an internal [[prototype]] property of the internal Object type. This property is not directly accessible with scripts, but it is the chain of objects referred to with the internal [[prototype]] property that is used in property accessor resolution; t...

How will Ecma-262 (EcmaScript 5) help you?

EcmaScript Fifth Edition, or Ecma-262, has been announced and contains some changes to the language. What features in the new version are going to help you write better code? ...

What scripting languages are similar to ECMA?

I am looking for an ECMAScript alternative to work as a scripting language for custom application logic. There are things I like about ECMA, especially the syntax for the newer spec(like AS3). Unfortunately, the AS3 engine is not open source to be able to integrate in a project. I would like a scripting language that was designed for ...

What is the difference between JavaScript and ECMAScript?

I was just reading John Resig's ECMAScript 5 post. From what I can work out, ECMAScript is the standard and JavaScript is the implementation. Is this correct? ...

Are there any .NET CLR/DLR implementations of ECMAScript?

Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is for Java. A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a handful of projects mentioned but never seen any come to light or in reality anything tha...

How can I rewrite the ErrorMessage for a CustomValidator control on the client?

I have a CustomValidator that is validating a telephone number for several different telephone numbering schemes. The client-side javascript looks like this: validatePhoneNumber(sender, args) { cleanNumber = args.Value.replace(/\D/, ""); country = $("#" + CountryID).get(0).value; switch (country) { case "North Americ...

JSON left out Infinity and NaN; JSON status in ECMAScript?

Any idea why JSON left out NaN and +/- Infinity? It puts Javascript in the strange situation where objects that would otherwise be serializable, are not, if they contain NaN or +/- infinity values. Looks like this has been cast in stone: see RFC4627 and ECMA-262 at the top of p. 197: Finite numbers are stringified as if by String(...

Which (javascript) environments support ECMAscript 5 strict mode? (aka "use strict")

ECMAScript 5 is in its final draft as I write this; It is due to include a strict mode which will prevent you from assigning to the global object, using eval, and other restrictions. (John Resig's Article is a good introduction.) This magical sanity-saving mode is triggered by including the string "use strict" at the top of your file (o...

ActionScript is like JavaScript?

I have a book, Essential ActionScript 3 (O'Reilly), to learn about using that language. It mentions that ActionScript 3 is an implementation of ECMAScript, just like Javascript. I find this strange, because there are many differences. In Javascript, as far as I know, you cannot give variables a type (var marvin : Robot) or create "tradit...

Does a real ECMAScript implementation exist, or is it just a spec?

I read both of the links below http://en.wikipedia.org/wiki/ECMAScript http://stackoverflow.com/questions/912479/what-is-the-difference-between-javascript-and-ecmascript My question is, does ECMAScript exist as something I can download and use instead of JavaScript? ...

Why is there no OFFICIAL JavaScript reference?

I tried to search for a JavaScript reference, but there's none available. The best two suggested sources are MDC and W3Schools. Why? ...

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 finding a difference in case sensitivity, function declarations and behavior of scoping bet...

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 ECMAScript-compliant? I didn't see anything in the specification, but JSLint returns an error. ...

EBNF for ECMAScript?

I'm trying to find a good EBNF description of ECMAScript, but so far I've not found anything complete. Any ideas? ...

ANTLR parser hanging at proxy.handshake call

I am attempting to get a basic ECMAScript parser working, and found a complete ANTLR grammar for ECMAScript 3, which appears to compile ok and produces the appropriate Lexer/Parser/Walker Java files. (Running inside ANTLR IDE plugin for Eclipse 3.5) However, when actually trying to use it with some simple test code (following guide on A...

Possible typos in ECMAScript 5 specification?

Does anybody know why, at the end of section 7.6 of the ECMA-262, 5th Edition specification, the nonterminals UnicodeLetter, UnicodeCombiningMark, UnicodeDigit, UnicodeconnectorPunctuation, and UnicodeEscapeSequence are not followed by two colons? From section 5.1.6: Nonterminal symbols are shown in italic type. The definition of ...

Why don't we just stop using the word JavaScript, in favor of ECMAScript?

The question says it all. ...

JavaScript date constructor and timezone

The Date constructor in JavaScript/ECMAScript/JScript allows passing the number of milliseconds since midnight, 1/1/1970. Nowhere can I find documentation whether this is midnight in the client machine's timezone, or midnight GMT. Which is it? Can it be relied on between different browsers and versions? Is this officially documented a...