mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
HTMLFormElement::Elements should honor [SameObject] attribute
Ideally, this would get tested by web-platform-tests, but that has yet to be implemented: https://github.com/w3c/web-platform-tests/issues/2462
This commit is contained in:
parent
4056716ecd
commit
1ff1ec69dd
3 changed files with 36 additions and 2 deletions
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Testing [SameObject] on the 'elements' attribute on the 'form' element</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
|
||||
<form>
|
||||
<input>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
var form = document.querySelector('form');
|
||||
var elements = form.elements;
|
||||
assert_true(elements === form.elements);
|
||||
form.appendChild(document.createElement('input'));
|
||||
assert_true(elements === form.elements);
|
||||
}, "[SameObject] should apply to 'elements' attr on <form>");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue