JSON.parse internals hook
allen at wirfs-brock.com
Tue Aug 20 12:43:58 PDT 2013
On Jul 31, 2013, at 7:52 AM, Anne van Kesteren wrote:
> I want to refer to the algorithm JSON.parse defines, but not
> necessarily JSON.parse itself (as that can be overridden). Is there
> any preferred way to do that? Or otherwise can JSONParse hook be
Simply reference the the appropriate clause of the ES specification that defines the function. EG, "the JSON.parse function defined in clause 188.8.131.52 of Ecma-262 Edition 5.1" (but the clause number is likely going to change for ES6)
Within ES5 we used a phrase like "the standard built-in JSON.parse function" to refer to the specified built-in function rather than the current value of the JSON.parse property.
Within ES6 we will use a formalism like %JSONparse% to mean the something. However, note that this notation means the built-in function as associated with a specific realm. This is important because the algorithm does realm specific things things like allocate objects and initialize their [[Prototype]] with a Realm specific value.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss