mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibJS: Set empty prototype for console object
This commit is contained in:
parent
d6303c9da9
commit
4a42c97f4d
Notes:
github-actions[bot]
2024-08-12 16:21:57 +00:00
Author: https://github.com/GasimGasimzada
Commit: 4a42c97f4d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1014
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 87 additions and 1 deletions
15
Tests/LibWeb/Text/input/console/console-prototype.html
Normal file
15
Tests/LibWeb/Text/input/console/console-prototype.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue