Browse Source

Added comment to the node attributes serialization.

Oskar Wróbel 7 years ago
parent
commit
d76c10780a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/ckeditor5-engine/src/model/node.js

+ 2 - 0
packages/ckeditor5-engine/src/model/node.js

@@ -380,6 +380,8 @@ export default class Node {
 	toJSON() {
 		const json = {};
 
+		// Serializes attributes to the object.
+		// attributes = { a: 'foo', b: 1, c: true }.
 		if ( this._attrs.size ) {
 			json.attributes = Array.from( this._attrs ).reduce( ( result, attr ) => {
 				result[ attr[ 0 ] ] = attr[ 1 ];