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

Method renderContent

src/View/Viewer/Text.js:84–102  ·  view source on GitHub ↗

* Renders content. * @protected * @return {BrickView} Fluent interface

()

Source from the content-addressed store, hash-verified

82 * @return {BrickView} Fluent interface
83 */
84 renderContent () {
85 this._$textarea = View.createElement('textarea', {
86 className: 'viewer-text__textarea',
87 ariaLabel: 'Content',
88 spellcheck: false,
89 value: this._text,
90 onInput: this.textareaValueDidChange.bind(this),
91 onFocus: evt => this.focus(),
92 onBlur: evt => this.blur()
93 })
94
95 if (this.isDisabled()) {
96 this._$textarea.disabled = 'disabled'
97 }
98
99 const $content = super.renderContent()
100 $content.appendChild(this._$textarea)
101 return $content
102 }
103
104 /**
105 * Triggered when textarea value changed.

Callers

nothing calls this directly

Calls 4

isDisabledMethod · 0.95
createElementMethod · 0.80
focusMethod · 0.80
blurMethod · 0.80

Tested by

no test coverage detected