Testing OmniGraffle 7.3 OmniJS – document.newCanvas() etc?

Might it be feasible to implement the following method(s)

document.newCanvas()

and/or (perhaps harder ?)

application.newDocument()

Context:

I am generating diagrams (trees, numerically weighted pie diagrams etc) from text outlines, which might be in macOS TaskPaper or OmniOutliner, or in iOS OmniOutliner or Drafts etc, and I would like to be able to move straight from a current outline state to a newly generated diagram in OmniGraffle.

Being able to create a fresh canvas (and / or document) in the script would reduce the risk of overwriting whatever happened to be in the front canvas of OG at the time, and would reduce the flow-disruption of needing to set up OG before submitting the outline from another app.

In macOS I could find a combined JXA + omniJS route to this, but on iOS I would need it in the OmniJS script.

Many thanks for all this excellent work …

Rob

Got it …

Portfolio.addCanvas() !!

Thanks ! (I had missed the Portfolio level of the model)