版博士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.
 
 
 
 

35 line
879 B

  1. import INode from '../nodes/node/INode';
  2. import IMutationObserverInit from './IMutationObserverInit';
  3. import MutationRecord from './MutationRecord';
  4. /**
  5. * The MutationObserver interface provides the ability to watch for changes being made to the DOM tree.
  6. *
  7. * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
  8. */
  9. export default class MutationObserver {
  10. private callback;
  11. private target;
  12. private listener;
  13. /**
  14. * Constructor.
  15. *
  16. * @param callback Callback.
  17. */
  18. constructor(callback: (records: MutationRecord[]) => void);
  19. /**
  20. * Starts observing.
  21. *
  22. * @param target Target.
  23. * @param options Options.
  24. */
  25. observe(target: INode, options: IMutationObserverInit): void;
  26. /**
  27. * Disconnects.
  28. */
  29. disconnect(): void;
  30. /**
  31. * Takes records.
  32. */
  33. takeRecords(): [];
  34. }