Menu
  • HOME
  • TAGS

Why is this configurable property not deletable?

javascript,properties,language-lawyer,ecma262

Effectively, configurable properties are deletable. But there is a big problem: that only applies to native objects, but not to host objects. As explained in 8.6.2 - Object Internal Properties and Methods, Host objects may support these internal properties with any implementation-dependent behaviour as long as it is consistent with...

How JavaScript's (0 == “”) === true agrees with ECMA-262 type conversion rules?

javascript,ecmascript-5,ecma262

The grammar allows for StringNumericLiteral to be empty: StringNumericLiteral :::     StrWhiteSpaceopt     StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt A few lines down, it says: A StringNumericLiteral that is empty or contains only white space is converted to +0. and: The MV of StringNumericLiteral ::: [empty] is 0. So I'm afraid you simply didn't fully...

Some complex behaviour with 'with' statement and call

javascript,with-statement,ecma262

OK, lets first simplify the code a little. I've refactored out that foo is a method, which is not necessary do demonstrate the unexpected behaviour. function foo(a) { // var x, y, bar - hoisting function bar() { console.log(x); console.log(y); console.log(a.x); } with (a) { var x = 20; var...

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

javascript,ecmascript-5,ecma262,function-expression

Where is the immutable binding record of the function name stored? In an extra lexical environment record that you cannot see :-) How come the function name foo outweigh var foo = 1 when resolved inside NFE? In fact it doesn't. You can declare a new local var foo...

Is \0 (“\\0” in a C-style regex string) a valid escape sequence in C++ regular expressions?

javascript,c++,regex,c++11,ecma262

This was a bug in libc++'s implementation of <regex>. It should be fixed now in the trunk, and this should propagate to OS X's release code eventually. Bug Report Patch Also, here is the excerpt from the ECMA 262 Standard that is the basis for this bug report: 15.10.2.11 DecimalEscape...