Bladeren bron

Code refactoring: Renamed the error thrown by the secureSourceElement() helper.

Aleksander Nowodzinski 6 jaren geleden
bovenliggende
commit
f7c09fa3a2

+ 2 - 2
packages/ckeditor5-core/src/editor/utils/securesourceelement.js

@@ -33,11 +33,11 @@ export default function secureSourceElement( editor ) {
 		 * has already been used to create another editor instance. Make sure each editor is
 		 * has already been used to create another editor instance. Make sure each editor is
 		 * created with an unique DOM element.
 		 * created with an unique DOM element.
 		 *
 		 *
-		 * @error securesourceelement-element-used-more-than-once
+		 * @error editor-source-element-already-used
 		 * @param {HTMLElement} element DOM element that caused the collision.
 		 * @param {HTMLElement} element DOM element that caused the collision.
 		 */
 		 */
 		throw new CKEditorError(
 		throw new CKEditorError(
-			'securesourceelement-element-used-more-than-once: ' +
+			'editor-source-element-already-used: ' +
 			'The DOM element cannot be used to create multiple editor instances.',
 			'The DOM element cannot be used to create multiple editor instances.',
 			editor
 			editor
 		);
 		);

+ 1 - 1
packages/ckeditor5-core/tests/editor/utils/securesourceelement.js

@@ -62,6 +62,6 @@ describe( 'secureSourceElement()', () => {
 
 
 		expectToThrowCKEditorError( () => {
 		expectToThrowCKEditorError( () => {
 			secureSourceElement( editor );
 			secureSourceElement( editor );
-		}, /^securesourceelement-element-used-more-than-once/, editor );
+		}, /^editor-source-element-already-used/, editor );
 	} );
 	} );
 } );
 } );