summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-selected-value-slot-ref.html
blob: ecb8c886a1d1ec39f99a389917e40a56e958dbf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<script src="support/fake-selectlist.js"></script>
<body>
<script>
  const selectlist = createFakeSelectlist('hello world');
  document.body.appendChild(selectlist);

  const oldSelectedValue = selectlist.querySelector('.fake-selectlist-selected-value');
  const newSelectedValue = document.createElement('div');
  newSelectedValue.textContent = 'new selected value';

  replaceChildElement(newSelectedValue, oldSelectedValue);
</script>