版博士V2.0程序
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

24 рядки
698 B

  1. import IEventTarget from './IEventTarget';
  2. /**
  3. * Message port.
  4. *
  5. * @see https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
  6. */
  7. export default interface IMessagePort extends IEventTarget {
  8. /**
  9. * Sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
  10. *
  11. * @param type Event type.
  12. * @param listener Listener.
  13. */
  14. postMessage(message: unknown, transerList: unknown[]): void;
  15. /**
  16. * Starts the sending of messages queued on the port.
  17. */
  18. start(): void;
  19. /**
  20. * Disconnects the port, so it is no longer active. This stops the flow of messages to that port.
  21. */
  22. close(): void;
  23. }