How to check the number of nodes in the clipboard

I can get the number I’m after by listening to an event, but I want to know how to get this number outside the context of the event:

What I have so far:

diagram.addDiagramListener('ClipboardChanged', e => {

What I’m looking for, but can’t find, is something like this:


The clipboard is inaccessible. But you could override this method to keep track:
CommandHandler | GoJS API

Thanks Walter, if thats the case I think we’ll just end up going with the localstorage version so we have more direct access over its contents