rootelement.js 750 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. CKEDITOR.define( [ 'treemodel/element' ], ( Element ) => {
  7. /**
  8. * Class for nodes that are roots of trees in tree data model.
  9. *
  10. * @class treeModel.RootElement
  11. */
  12. class RootElement extends Element {
  13. /**
  14. * Creates tree root node.
  15. *
  16. * @param {treeModel.Document} doc {@link treeModel.Document} that is an owner of the root.
  17. * @constructor
  18. */
  19. constructor( doc ) {
  20. super( 'root' );
  21. /**
  22. * {@link treeModel.Document} that is an owner of this root.
  23. *
  24. * @readonly
  25. * @property {treeModel.Document}
  26. */
  27. this.document = doc;
  28. }
  29. }
  30. return RootElement;
  31. } );