builtin.js (1771B)
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.israwjson 6 description: > 7 JSON.isRawJSON 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.isRawJSON), "JSON.isRawJSON is extensible"); 33 assert.sameValue( 34 typeof JSON.isRawJSON, 35 'function', 36 'The value of `typeof JSON.isRawJSON` is "function"' 37 ); 38 assert.sameValue( 39 Object.getPrototypeOf(JSON.isRawJSON), 40 Function.prototype, 41 'Object.getPrototypeOf(JSON.isRawJSON) must return the value of "Function.prototype"' 42 ); 43 44 assert.sameValue( 45 Object.getOwnPropertyDescriptor(JSON.isRawJSON, "prototype"), 46 undefined, 47 "JSON.isRawJSON has no own prototype property" 48 ); 49 50 reportCompare(0, 0);