fix(frontend/player):add Select to set_input_value
This commit is contained in:
parent
d4262fcf33
commit
41797730d3
1 changed files with 6 additions and 3 deletions
|
|
@ -209,9 +209,12 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
case "set_input_value":
|
||||
node = this.nl[ msg.id ]
|
||||
if (!node) { logger.error("Node not found", msg); return }
|
||||
if (!(node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement)) {
|
||||
logger.error("Trying to set value of non-Input element", msg)
|
||||
return
|
||||
if (!(node instanceof HTMLInputElement
|
||||
|| node instanceof HTMLTextAreaElement
|
||||
|| node instanceof HTMLSelectElement)
|
||||
) {
|
||||
logger.error("Trying to set value of non-Input element", msg)
|
||||
return
|
||||
}
|
||||
const val = msg.mask > 0 ? '*'.repeat(msg.mask) : msg.value
|
||||
doc = this.screen.document
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue