Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9499b57

Browse filesBrowse files
Change parser behavior of <select><select>
This patch makes the HTML parser convert nested <select> tags into </select> instead of </select><select> for backwards compatibility with the old parser. This behavior will apply to any nested selects, such as <select><div><select>. This was recommended here: whatwg/html#10557 (comment) This will be tested here: html5lib/html5lib-tests#178 (comment) Change-Id: I7a39901582b96edc10deca8794b9ce117aa08229
1 parent d3d219e commit 9499b57
Copy full SHA for 9499b57

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html

Copy file name to clipboardExpand all lines: html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@
104104
const outerSelect = document.getElementById('nested1');
105105
const innerSelect = document.getElementById('expectafter1');
106106
const nextDiv = document.getElementById('expectafter1b');
107-
assert_true(!!outerSelect && !!innerSelect);
108-
assert_equals(outerSelect.nextSibling, innerSelect,'Nested select should be pushed out as the next sibling');
109-
assert_equals(innerSelect.nextElementSibling, nextDiv,'Subsequent content is there too');
107+
assert_true(!!outerSelect);
108+
assert_equals(innerSelect, null,'Nested select should be removed');
109+
assert_equals(outerSelect.nextElementSibling, nextDiv,'Subsequent content is there too');
110110
}, 'Nested selects should be retained 1');
111111

112112
test(() => {
113113
const outerSelect = document.getElementById('nested2');
114114
const innerSelect = document.getElementById('expectafter2');
115-
assert_true(!!outerSelect && !!innerSelect);
116-
assert_equals(outerSelect.nextSibling, innerSelect,'Nested select should be pushed out as the next sibling');
115+
assert_true(!!outerSelect);
116+
assert_equals(innerSelect, null,'Nested select should be pushed out as the next sibling');
117117
}, 'Nested selects should be retained 2');
118118
</script>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.