diff options
Diffstat (limited to 'ext/js/dom/text-source-element.js')
-rw-r--r-- | ext/js/dom/text-source-element.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/js/dom/text-source-element.js b/ext/js/dom/text-source-element.js index 45186636..1576bd5e 100644 --- a/ext/js/dom/text-source-element.js +++ b/ext/js/dom/text-source-element.js @@ -126,6 +126,13 @@ class TextSourceElement { case 'IMG': content = element.getAttribute('alt') || ''; break; + case 'SELECT': + { + const {selectedIndex, options} = element; + const option = (selectedIndex >= 0 && selectedIndex < options.length ? options[selectedIndex] : null); + content = (option !== null ? option.textContent : ''); + } + break; default: content = `${element.value}`; break; |