You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
641 B

  1. import NodeType from './type';
  2. import Node from './node';
  3. /**
  4. * TextNode to contain a text element in DOM tree.
  5. * @param {string} value [description]
  6. */
  7. export default class TextNode extends Node {
  8. rawText: string;
  9. constructor(rawText: string);
  10. /**
  11. * Node Type declaration.
  12. * @type {Number}
  13. */
  14. nodeType: NodeType;
  15. /**
  16. * Get unescaped text value of current node and its children.
  17. * @return {string} text content
  18. */
  19. get text(): string;
  20. /**
  21. * Detect if the node contains only white space.
  22. * @return {bool}
  23. */
  24. get isWhitespace(): boolean;
  25. toString(): string;
  26. }