Trigger the browser print dialog for the whole page or a single element.
Import: @rtorcato/browser-common/print
Example
import { isPrintAvailable, printPage, printElementById } from '@rtorcato/browser-common/print'
if (isPrintAvailable()) {
printPage()
printElementById('receipt')
}
Exports
printPage()— triggers the browser's print dialogprintElementById(elementId)— opens a new window with the element's content and prints itisPrintAvailable()— feature check
See the API reference for full signatures.