mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
363 B
28 lines
363 B
12 years ago
|
/*===
|
||
|
[object JSON]
|
||
|
true
|
||
|
TypeError
|
||
|
TypeError
|
||
|
===*/
|
||
|
|
||
|
/* [[Class]] is "JSON" */
|
||
|
print(Object.prototype.toString.call(JSON));
|
||
|
|
||
|
/* extensible */
|
||
|
print(Object.isExtensible(JSON));
|
||
|
|
||
|
try {
|
||
|
// not constructable -> TypeError
|
||
|
new JSON();
|
||
|
} catch (e) {
|
||
|
print(e.name);
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
// not callable -> TypeError
|
||
|
new JSON();
|
||
|
} catch (e) {
|
||
|
print(e.name);
|
||
|
}
|
||
|
|