mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
24 lines
764 B
HTML
24 lines
764 B
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<body>
|
||
|
|
<span id=test></span>
|
||
|
|
</body>
|
||
|
|
<script src="include.js"></script>
|
||
|
|
<script>
|
||
|
|
test(() => {
|
||
|
|
var elements = document.getElementsByTagName("span");
|
||
|
|
try {
|
||
|
|
Object.defineProperty(elements, 'test', { value: 5 });
|
||
|
|
println("[Fail] Object.defineProperty(HTMLCollection, key, value) succeeds");
|
||
|
|
} catch (e) {
|
||
|
|
println("[Pass] Object.defineProperty(HTMLCollection, key, value) throws");
|
||
|
|
}
|
||
|
|
|
||
|
|
try {
|
||
|
|
(function() { "use strict"; elements['test'] = 5; })();
|
||
|
|
println("[Fail] \"use strict\"; HTMLCollection[key] setter succeeds");
|
||
|
|
} catch (e) {
|
||
|
|
println("[Pass] \"use strict\"; HTMLCollection[key] setter throws");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|