Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Printing

Index

Type aliases

OptionalAsyncThunk

OptionalAsyncThunk: function

Function that takes no arguments and when invoked prints out some object or null if printing is not defined.

Type declaration

    • (): Promise<void> | null
    • Returns Promise<void> | null

Variables

Const symbol

symbol: unique symbol = Symbol('printable')

Symbol to use for a method that returns a function to print an object.

Functions

getPrintFunction

  • Returns the print function for an object, or null if it does not provide a handler.

    Parameters

    • val: unknown

    Returns OptionalAsyncThunk

isPrintable

  • isPrintable(a: unknown): boolean
  • Returns whether an object implements a print method.

    Parameters

    • a: unknown

    Returns boolean

printURL

  • printURL(url: string): Promise<void>
  • Prints a URL by loading it into an iframe.

    Parameters

    • url: string

      URL to load into an iframe.

    Returns Promise<void>

printWidget

  • printWidget(widget: Widget): Promise<void>
  • Prints a widget by copying it's DOM node to a hidden iframe and printing that iframe.

    Parameters

    • widget: Widget

    Returns Promise<void>

Generated using TypeDoc