How to capture the screen using Niantic Studio?

i need to capture the screen for certain purpose when user click a UI button on the screen.
but i tried and non of these work: toDataURL, toBlob, createFramebuffer, readPixels or html2canvas

the failure may be due to preserveDrawingBuffer is set to false initially.
can someone tech me how to do the capture?

Hi! where you able to make it work? I am new to using the studio and have no idea how to do something like this.