Optional ReadonlyselectionOptional ReadonlyserializeWrite the file somewhere else, off the main thread, say. Null (or no option) leaves it to the exporter here, as for a format that needs the page's DOM.
Optional ReadonlythemePalette override; the one the editor is rendering in by default.
Optional ReadonlytitleTitle override; the first heading by default.
Optional ReadonlytransformThe document as it goes out, from the document as it is: conditional content settled by its variables, say.
Export the selection instead of the whole document.