Skip to content

Commit

Permalink
selectlist: add copydom attribute to <selectedoption>
Browse files Browse the repository at this point in the history
The copydom attribute on <selectedoption> will make the parent
<selectlist> start using cloneNode() on the selected <option>, rather
than textContent, to populate the selectedoption. This use case has been
discussed here: openui/open-ui#571

We aren't sure yet if this will be the path forward, but prototyping it
and getting feedback will help move this issue forward.

Bug: 1121840
Change-Id: Ia7c007b2193a8a0777295e299b57704d72832056
  • Loading branch information
josepharhar authored and chromium-wpt-export-bot committed Aug 29, 2023
1 parent 6ea4ba5 commit 4b660ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<button>
<span style="color:red">red</span> one
</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/openui/open-ui/issues/571">
<link rel=match href="selectlist-selectedoption-element-cloning-ref.html">

<selectlist>
<button type=selectlist>
<selectedoption copydom></selectedoption>
</button>
<option><span style="color:red">red</span> one</option>
</selectlist>

0 comments on commit 4b660ad

Please sign in to comment.