* Triggered when input value has been changed. * @param {Event} evt
(evt)
| 66 | * @param {Event} evt |
| 67 | */ |
| 68 | inputValueDidChange (evt) { |
| 69 | const string = StringUtil.removeWhitespaces(this._$input.value) |
| 70 | |
| 71 | // Verify hexadecimal format |
| 72 | if (string.match(/^[0-9a-f]+$/gi) === null) { |
| 73 | return this.setMessage('The value contains non-hexadecimal characters') |
| 74 | } |
| 75 | |
| 76 | // Clear message |
| 77 | this.clearMessage() |
| 78 | |
| 79 | // Interpret bytes |
| 80 | const bytes = ByteEncoder.bytesFromHexString(string) |
| 81 | this.getModel().viewValueDidChange(this, bytes) |
| 82 | } |
| 83 | } |
nothing calls this directly
no test coverage detected