document.js 725 B

1234567891011121314151617181920212223242526272829303132333435363738
  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( [ 'document/element' ], function( Element ) {
  7. /**
  8. * Document model.
  9. *
  10. * @class document.Document
  11. */
  12. class Document {
  13. /**
  14. * Create an empty document.
  15. */
  16. constructor() {
  17. /**
  18. * Document tree root. Document always have an root document.
  19. *
  20. * @readonly
  21. * @property {String} root
  22. */
  23. this.root = new Element( null, 'root' );
  24. }
  25. /**
  26. * This is the only entry point for all document changes.
  27. *
  28. * @param {document.Element} operation Operation to be applied.
  29. */
  30. applyOperation() {
  31. }
  32. }
  33. return Document;
  34. } );