Ver código fonte

Removed "view.Writer#setTextData()".

Kamil Piechaczek 7 anos atrás
pai
commit
893834654f

+ 0 - 10
packages/ckeditor5-engine/src/view/writer.js

@@ -249,16 +249,6 @@ export default class Writer {
 	}
 
 	/**
-	 * Sets the text content for the specified `textNode`.
-	 *
-	 * @param {String} value New value.
-	 * @param {module:engine/view/text~Text} textNode Text node that will be updated.
-	 */
-	setTextData( value, textNode ) {
-		textNode._data = value;
-	}
-
-	/**
 	 * Adds or overwrite element's attribute with a specified key and value.
 	 *
 	 *		writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );

+ 0 - 10
packages/ckeditor5-engine/tests/view/writer/writer.js

@@ -130,16 +130,6 @@ describe( 'Writer', () => {
 		} );
 	} );
 
-	describe( 'setTextData()', () => {
-		it( 'should update the content for text node', () => {
-			const textNode = writer.createText( 'foo' );
-
-			writer.setTextData( 'bar', textNode );
-
-			expect( textNode.data ).to.equal( 'bar' );
-		} );
-	} );
-
 	describe( 'setAttribute()', () => {
 		it( 'should set attribute on given element', () => {
 			const element = writer.createAttributeElement( 'span' );