(
element: HTMLElement,
options?: Partial<PrintOptions>
)
| 30 | } |
| 31 | |
| 32 | static print( |
| 33 | element: HTMLElement, |
| 34 | options?: Partial<PrintOptions> |
| 35 | ): Promise<void> { |
| 36 | const mergedOptions = { ...Print.defaultOptions, ...options } |
| 37 | const $element = element |
| 38 | const content = Print.getContentToPrint($element, mergedOptions) |
| 39 | |
| 40 | return mergedOptions.iframe |
| 41 | ? Print.printContentInIFrame(content, mergedOptions) |
| 42 | : Print.printContentInNewWindow(content, mergedOptions) |
| 43 | } |
| 44 | |
| 45 | private static getContentToPrint( |
| 46 | element: HTMLElement, |
no test coverage detected