utils.serializePage() without rendering first the page?

I have a page with a table wherein a modal appears as I click a table row.
the modal then renders the data referencing from the selected row.

Is it possible to use utils.serializePage() for serializing a page as base64Data without rendering the modal contents or better yet without showing the modal?