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

41 line
1.2 KiB

  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 Event_1 = __importDefault(require("../Event"));
  7. /**
  8. *
  9. */
  10. class CustomEvent extends Event_1.default {
  11. /**
  12. * Constructor.
  13. *
  14. * @param type Event type.
  15. * @param [eventInit] Event init.
  16. */
  17. constructor(type, eventInit = null) {
  18. super(type, eventInit);
  19. this.detail = null;
  20. if (eventInit) {
  21. this.detail = eventInit.detail !== undefined ? eventInit.detail : null;
  22. }
  23. }
  24. /**
  25. * Init event.
  26. *
  27. * @deprecated
  28. * @param type Type.
  29. * @param [bubbles=false] "true" if it bubbles.
  30. * @param [cancelable=false] "true" if it cancelable.
  31. * @param [detail=null] Custom event detail.
  32. */
  33. initCustomEvent(type, bubbles = false, cancelable = false, detail = null) {
  34. this.type = type;
  35. this.bubbles = bubbles;
  36. this.cancelable = cancelable;
  37. this.detail = detail;
  38. }
  39. }
  40. exports.default = CustomEvent;
  41. //# sourceMappingURL=CustomEvent.js.map