LibJS: Set empty prototype for console object

This commit is contained in:
Gasim Gasimzada 2024-08-08 20:21:06 +02:00 committed by Tim Ledbetter
commit 4a42c97f4d
Notes: github-actions[bot] 2024-08-12 16:21:57 +00:00
6 changed files with 87 additions and 1 deletions

View file

@ -0,0 +1,15 @@
<script src="../include.js"></script>
<script>
test(() => {
const p1 = Object.getPrototypeOf(console)
const p2 = Object.getPrototypeOf(p1)
println(Object.getOwnPropertyNames(p1).length)
if (p2 == Object.prototype) {
println("Prototype of console prototype is Object.prototype")
} else {
println("Prototype of console prototype is NOT Object.prototype")
}
});
</script>