版博士V2.0程序
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.
 
 
 
 

51 lines
1.9 KiB

  1. import INode from '../node/INode';
  2. import IChildNode from '../child-node/IChildNode';
  3. import INonDocumentTypeChildNode from '../child-node/INonDocumentTypeChildNode';
  4. export default interface ICharacterData extends INode, IChildNode, INonDocumentTypeChildNode {
  5. data: string;
  6. readonly length: number;
  7. /**
  8. * Appends the given DOMString to the CharacterData.data string; when this method returns, data contains the concatenated DOMString.
  9. *
  10. * @param data Data.
  11. */
  12. appendData(data: string): void;
  13. /**
  14. * Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString.
  15. *
  16. * @param offset Offset.
  17. * @param count Count.
  18. */
  19. deleteData(offset: number, count: number): void;
  20. /**
  21. * Inserts the specified characters, at the specified offset, in the CharacterData.data string; when this method returns, data contains the modified DOMString.
  22. *
  23. * @param offset Offset.
  24. * @param data Data.
  25. */
  26. insertData(offset: number, data: string): void;
  27. /**
  28. * Replaces the specified amount of characters, starting at the specified offset, with the specified DOMString; when this method returns, data contains the modified DOMString.
  29. *
  30. * @param offset Offset.
  31. * @param count Count.
  32. * @param data Data.
  33. */
  34. replaceData(offset: number, count: number, data: string): void;
  35. /**
  36. * Returns a DOMString containing the part of CharacterData.data of the specified length and starting at the specified offset.
  37. *
  38. * @param offset Offset.
  39. * @param count Count.
  40. */
  41. substringData(offset: number, count: number): string;
  42. /**
  43. * Clones a node.
  44. *
  45. * @override
  46. * @param [deep=false] "true" to clone deep.
  47. * @returns Cloned node.
  48. */
  49. cloneNode(deep?: boolean): ICharacterData;
  50. }