MCPcopy Create free account
hub / github.com/cryptii/cryptii / inputValueDidChange

Method inputValueDidChange

src/View/Field/Byte.js:68–82  ·  view source on GitHub ↗

* Triggered when input value has been changed. * @param {Event} evt

(evt)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 7

removeWhitespacesMethod · 0.80
matchMethod · 0.80
setMessageMethod · 0.80
clearMessageMethod · 0.80
bytesFromHexStringMethod · 0.80
viewValueDidChangeMethod · 0.45
getModelMethod · 0.45

Tested by

no test coverage detected