capture — Screenshots and video recording#

Kate allows players to take screenshots and record videos of a cartridge’s game play. However, it is the cartridge that decides what the player captures, by specifying which Canvas should be the capture target.

KateAPI.capture.set_root(element: HTMLCanvasElement | null)#
Parameters:

element – The canvas to capture, or null to disable captures.

Defines the canvas that should be the target of screenshots and video captures. You can change this at any point in the cartridge, and setting it to null will disable screenshots and video captures until it’s set to an HTMLCanvasElement again.