How to Print in Vaadin Flow?
问题 I would like to print out the content of a homepage created with Vaadin 14 from a button. with Vaadin 8 was a solution that unfortunately is no longer applicable: Button print = new Button("Print This Page"); print.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { // Print the current page JavaScript.getCurrent().execute("print();"); } }); Any Idea how to do this in Vaadin14 please? 回答1: In Vaadin 10 and later, you can run arbitrary JavaScript by