builtin.js (1718B)
1 // Copyright (C) 2024 Igalia S.L. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-json.rawjson 6 description: > 7 JSON.rawJSON meets the requirements for built-in objects 8 info: | 9 JSON.isRawJSON ( O ) 10 11 18 ECMAScript Standard Built-in Objects 12 ... 13 Unless specified otherwise, a built-in object that is callable as a function 14 is a built-in function object with the characteristics described in 10.3. 15 Unless specified otherwise, the [[Extensible]] internal slot of a built-in 16 object initially has the value true. Every built-in function object has a 17 [[Realm]] internal slot whose value is the Realm Record of the realm for 18 which the object was initially created. 19 ... 20 Unless otherwise specified every built-in function and every built-in 21 constructor has the Function prototype object, which is the initial value of 22 the expression Function.prototype (20.2.3), as the value of its [[Prototype]] 23 internal slot. 24 ... 25 Built-in function objects that are not identified as constructors do not 26 implement the [[Construct]] internal method unless otherwise specified in the 27 description of a particular function. 28 29 features: [json-parse-with-source] 30 ---*/ 31 32 assert(Object.isExtensible(JSON.rawJSON), "JSON.rawJSON is extensible"); 33 assert.sameValue( 34 typeof JSON.rawJSON, 35 'function', 36 'The value of `typeof JSON.rawJSON` is "function"' 37 ); 38 39 assert.sameValue( 40 Object.getPrototypeOf(JSON.rawJSON), 41 Function.prototype, 42 "Prototype of JSON.rawJSON is Function.prototype" 43 ); 44 45 assert.sameValue( 46 Object.getOwnPropertyDescriptor(JSON.rawJSON, "prototype"), 47 undefined, 48 "JSON.rawJSON has no own prototype property" 49 ); 50 51 reportCompare(0, 0);