How to trigger native screenshot function of iOS and Android thru Javascript?

I am currently working on an Ionic Vue App and want to take a screenshot of the entire page. Since I have multiple canvases with different context types on the screen, famous libs like ‘html2canvas’ do not work for me. The cordova plugin also was no success for me sadly.

Is there a way to trigger the native screenshot function of a device thru JS? The taskbar at the top as well as buttons at the bottom are allowed to be visible on the screenshot.

My app is not designed to be used on PC, so I do not have to worry about this paltform.