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

Method renderField

src/View/Field/Byte.js:46–62  ·  view source on GitHub ↗

* Renders field. * @protected * @return {?HTMLElement}

()

Source from the content-addressed store, hash-verified

44 * @return {?HTMLElement}
45 */
46 renderField () {
47 this._$input = View.createElement('input', {
48 className: 'field-byte__input',
49 id: this.getId(),
50 type: 'text',
51 spellcheck: false,
52 onInput: this.inputValueDidChange.bind(this),
53 onFocus: evt => this.focus(),
54 onBlur: evt => this.blur()
55 })
56
57 const $field = super.renderField()
58 $field.classList.remove('field__field')
59 $field.classList.add('field-byte__field')
60 $field.appendChild(this._$input)
61 return $field
62 }
63
64 /**
65 * Triggered when input value has been changed.

Callers

nothing calls this directly

Calls 4

createElementMethod · 0.80
focusMethod · 0.80
blurMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected