Window.print () does not work

When I do the above function I get an error
Cannot find name ‘window’.

Thank you

You can’t access the DOM from the page code.
You should use a custom element.
https://support.wix.com/en/article/velo-about-custom-elements

To be exact you don’t have access to the window object :slight_smile:

Yea, thanks for the correction.

For more information, see Velo: Javascript Support .

so how to fix?

Use custom element (see link above)

Or use Custom Code: Embedding Custom Code on Your Site | Help Center | Wix.com.