Files
serenity/Tests/LibWeb/Text/input/all-window-properties.html
Andreas Kling bdf3071bd9 Tests/LibWeb: Add test that dumps all global JS constructors
(cherry picked from commit a84261ee7a5e0b76a03225d71ec64424d4865a78)
2024-06-28 23:43:59 +02:00

19 lines
508 B
HTML

<script src="include.js"></script>
<script>
test(() => {
const properties = Object.getOwnPropertyNames(window);
const constructors = properties.filter(prop => {
try {
const value = window[prop];
return typeof value === 'function' && !!value.prototype;
} catch (e) {
return false;
}
});
constructors.sort();
for (const c of constructors)
println(c);
});
</script>