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

Method renderField

src/View/Field/Text.js:41–57  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

39 * @return {?HTMLElement}
40 */
41 renderField () {
42 this._$input = View.createElement('input', {
43 className: 'field-text__input',
44 id: this.getId(),
45 type: 'text',
46 spellcheck: false,
47 onInput: this.inputValueDidChange.bind(this),
48 onFocus: evt => this.focus(),
49 onBlur: evt => this.blur()
50 })
51
52 const $field = super.renderField()
53 $field.classList.remove('field__field')
54 $field.classList.add('field-text__field')
55 $field.appendChild(this._$input)
56 return $field
57 }
58
59 /**
60 * 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