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

MessagePort.js 1.0 KiB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const EventTarget_1 = __importDefault(require("./EventTarget"));
  7. /**
  8. * Message port.
  9. *
  10. * @see https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
  11. */
  12. class MessagePort extends EventTarget_1.default {
  13. /**
  14. * Sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
  15. *
  16. * @param _message Message.
  17. * @param _transerList Transfer list.
  18. */
  19. postMessage(_message, _transerList) {
  20. // TODO: Implement
  21. }
  22. /**
  23. * Starts the sending of messages queued on the port.
  24. */
  25. start() {
  26. // TODO: Implement
  27. }
  28. /**
  29. * Disconnects the port, so it is no longer active. This stops the flow of messages to that port.
  30. */
  31. close() {
  32. // TODO: Implement
  33. }
  34. }
  35. exports.default = MessagePort;
  36. //# sourceMappingURL=MessagePort.js.map