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.
27 lines
363 B
27 lines
363 B
/*===
|
|
[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);
|
|
}
|
|
|
|
|