I’m running this script from within a configured event on a momentary.
I get the following error when I use the button in the designer preview mode:
Error running action ‘dom.onMouseDown’ on project/site/area/Processing Statistics/Components/PrinterButton@D$0:1/root/Button: AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘print’
Don’t hold your breath waiting for this. Browser security pretty much prohibits anything like it. Maybe possible in the future in Perspective Workstation.