Test multiple option elements against selectedcontent#183
Test multiple option elements against selectedcontent#183annevk merged 1 commit intohtml5lib:masterfrom
Conversation
Right now, there are no tests that check this behavior, even though it's a very important implementation detail that can be easily overlooked when implementing `selectedcontent` logic in parsers. In my opinion, it's perfectly reasonable to cover this with tests for the sake of completeness.
There was a problem hiding this comment.
Looks correct to me, but would appreciate a review from @josepharhar as well.
Also, thanks for contributing these!
josepharhar
left a comment
There was a problem hiding this comment.
looks good, this passes in chromium
|
For these tests to pass, I am assuming HTML parser should call "The reset algorithm for a select element". But I can't find a place from where it should be called. @josepharhar Can you help me? There is no form, so I am guessing not from form reset. And it can't be from create-an-element-for-the-token because that's too early (no options yet). ChatGPT says it is called when select’s list of options changes, but I can't find any mention of that in the standard. Nevermind, found it: The option HTML element insertion steps. |
Right now, there are no tests that check this behavior, even though it's a very important implementation detail that can be easily overlooked when implementing
selectedcontentlogic in parsers. In my opinion, it's perfectly reasonable to cover this with tests for the sake of completeness.