MCPcopy
hub / github.com/027xiguapi/code-box / print

Method print

utils/print.ts:32–43  ·  view source on GitHub ↗
(
    element: HTMLElement,
    options?: Partial<PrintOptions>
  )

Source from the content-addressed store, hash-verified

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,

Callers 15

printContentInIFrameMethod · 0.80
handleOkModalFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80
downloadPdfFunction · 0.80

Calls 3

getContentToPrintMethod · 0.80
printContentInIFrameMethod · 0.80

Tested by

no test coverage detected