Interesting… do you have a link to the docs? The easiest thing prob would be to set the window to be fullscreen, but on that virtual display. That would accomplish per window screen capture.
https://github.com/enfp-dev-studio/node-mac-virtual-display/...