Bladeren bron

Document the return value for InputTextView._createInputTextView.

Rename  to  to reduce the confusion with an  event or native element.
Tomek Wytrębowicz 5 jaren geleden
bovenliggende
commit
76e249e983
1 gewijzigde bestanden met toevoegingen van 10 en 9 verwijderingen
  1. 10 9
      packages/ckeditor5-table/src/ui/colorinputview.js

+ 10 - 9
packages/ckeditor5-table/src/ui/colorinputview.js

@@ -186,25 +186,26 @@ export default class ColorInputView extends View {
 	}
 
 	/**
-	 * Creates and configures the {@link #_inputView}.
+	 * Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}.
 	 *
 	 * @private
+	 * @returns {module:ui/inputtext/inputtextview~InputTextView} A configured instance to be set as {@link #_inputView}.
 	 */
 	_createInputTextView() {
 		const locale = this.locale;
-		const input = new InputTextView( locale );
+		const inputView = new InputTextView( locale );
 
-		input.bind( 'value' ).to( this );
-		input.bind( 'isReadOnly' ).to( this );
-		input.bind( 'hasError' ).to( this );
+		inputView.bind( 'value' ).to( this );
+		inputView.bind( 'isReadOnly' ).to( this );
+		inputView.bind( 'hasError' ).to( this );
 
-		input.on( 'input', () => {
-			this.value = input.element.value;
+		inputView.on( 'input', () => {
+			this.value = inputView.element.value;
 		} );
 
-		input.delegate( 'input' ).to( this );
+		inputView.delegate( 'input' ).to( this );
 
-		return input;
+		return inputView;
 	}
 
 	/**