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

Method getContentToPrint

utils/print.ts:45–56  ·  view source on GitHub ↗
(
    element: HTMLElement,
    options: PrintOptions
  )

Source from the content-addressed store, hash-verified

43 }
44
45 private static getContentToPrint(
46 element: HTMLElement,
47 options: PrintOptions
48 ): string {
49 const clone = element.cloneNode(true) as HTMLElement
50 Print.handleStyles(clone, options)
51 Print.removeUnwantedElements(clone, options.noPrintSelector)
52 Print.handleFormValues(clone, options.manuallyCopyFormValues)
53 Print.addExtraContent(clone, options)
54
55 return clone.outerHTML
56 }
57
58 private static handleStyles(clone: HTMLElement, options: PrintOptions): void {
59 if (options.globalStyles) {

Callers 1

printMethod · 0.80

Calls 4

handleStylesMethod · 0.80
handleFormValuesMethod · 0.80
addExtraContentMethod · 0.80

Tested by

no test coverage detected