Can we print page using javascript code in mobile version

Hi, I am using javascript:window.print() in html snippet for desktop version which prints the page but if I want to use this print function in mobile version it possible? I am currently using this in mobile html snippet with the same code of desktop but this doesn't worked. I know this is not correct code but I don't know if we can actually use print functionality in mobile version or not. If we can use the print function then please can anyone help me out how I can do it with right code. Thanks in advance.
1 answers

According to this post it is not in the ECMA standards. But some solutions are given.