ecma262

Activation and Variable Object in JavaScript?

天涯浪子 提交于 2019-11-28 15:51:07
问题 Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms interchangeably. 回答1: Well, I just learned something :). From this article, it would appear that within the execution context of a function , the Activation Object is used as the

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

泄露秘密 提交于 2019-11-28 15:43:56
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 that I've ever been able to run script on. Here's what I know about already: MSScriptControl ActiveX Control : AFAIK, this was Microsoft's last real ECMAScript-compliant implementaiton (runs JScript 5.7). I've integrated with MSScriptControl but don't consider

Why is there no OFFICIAL JavaScript reference? [closed]

一曲冷凌霜 提交于 2019-11-28 13:57:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I tried to search for a JavaScript reference, but there's none available. The best two suggested sources are MDN (Mozilla Developer Network) and W3Schools. Why? 回答1: It's not like there is an official JavaScript release. All the browsers have made their own JavaScript engine - some are using the same though. But

Where is the immutable binding record of the identifier in a named function expression stored in JavaScript?

两盒软妹~` 提交于 2019-11-28 08:18:36
问题 Recently I ran into some interesting facts about named function expressions (NFE). I understand that the function name of an NFE can be accessed within the function body, which makes recursion more convenient and saves us arguments.callee . And the function name is not available outside the function body. For example, var foo = function bar() { console.log(typeof bar); }; typeof foo; // 'function' typeof bar; // 'undefined', inaccessible outside the NFE foo(); // 'function', accessible inside

Why does “dtoa.c” contain so much code?

你说的曾经没有我的故事 提交于 2019-11-27 19:26:25
I'll be the first to admit that my overall knowledge of low level programming is a bit sparse. I understand many of the core concepts but I do not use them on a regular basis. That being said I was absolutely astounded at how much code was needed for dtoa.c . For the past couple months I have been working on an ECMAScript implementation in C# and I've been slowing filling in the holes in my engine. Last night I started working on Number.prototype.toString which is described in section 15.7.4.2 of the ECMAScript specification (pdf) . In section 9.8.1 , NOTE 3 offers a link to dtoa.c but I was

Why JSON allows only string to be a key?

只愿长相守 提交于 2019-11-27 17:48:10
问题 Why does JSON only allow a string to be a key of a pair? Why not other types such as null , number , bool , object , array ? Considering JSON is tightly related with JavaScript, could I conclude the reason from JavaScript specification (ECMA-262)? I'm totally a newbie to JavaScript, could you help me to point it out. 回答1: The JSON format is deliberately based on a subset of JavaScript object literal syntax and array literal syntax, and JavaScript objects can only have strings as keys - thus

Relation between [[Prototype]] and prototype in JavaScript

蹲街弑〆低调 提交于 2019-11-27 17:21:26
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; the object's prototype chain. A public prototype property exists to allow the assignment, definition and manipulation of prototypes in association with the internal [[prototype]] property. The details of the relationship between to two are described in ECMA 262 (3rd

Why was ECMAScript 4th edition completely scrapped?

廉价感情. 提交于 2019-11-27 14:44:04
I've been looking for some information regarding the scrapped ECMAScript 4th Edition without much success, even on SO. I know Mozilla's JavaScript 1.7 implemented many (all?) of the new features offered in 4th Edition and I thought I remembered a good John Resig post on it but I can't seem to find it on his blog now. In particularly, I want to know why it was completely scrapped in favour of ECMA-262 5th Edition and why it wasn't just improved upon. Some of the features are pretty cool, like generators, iterators, let, new assignment operators and (my particular favourite) destructuring

Is ECMAScript really a dialect of Lisp?

做~自己de王妃 提交于 2019-11-27 11:27:08
问题 A friend of mine drew my attention the welcome message of 4th European Lisp Symposium: ... implementation and application of any of the Lisp dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, Dylan, Clojure, ACL2, ECMAScript , ... and then asked if ECMAScript is really a dialect of Lisp. Can it really be considered so? Why? Is there a well defined and clear-cut set of criteria to help us detect whether a language is a dialect of Lisp? Or is being a dialect taken in a very

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

拟墨画扇 提交于 2019-11-27 09:22:13
问题 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 that I've ever been able to run script on. Here's what I know about already: MSScriptControl ActiveX Control : AFAIK, this was Microsoft's last real ECMAScript