interceptEvents()

in projects/libs/flex-layout/core/media-marshaller/print-hook.ts [151:167]


  interceptEvents(target: HookTarget) {
    return (event: MediaChange) => {
      if (this.isPrintEvent(event)) {
        if (event.matches && !this.isPrinting) {
          this.startPrinting(target, this.getEventBreakpoints(event));
          target.updateStyles();
        } else if (!event.matches && this.isPrinting && !this.isPrintingBeforeAfterEvent) {
          this.stopPrinting(target);
          target.updateStyles();
        }

        return;
      }

      this.collectActivations(target, event);
    };
  }