Can you please share ECMAScript version of Peter Lambrechtsen's code?
A while ago I was looking for a way to send an XDS document to another driver's cache for processing.
I already knew how to call DXCommand to inject an event for immediate asynchronous processing or send a command for synchronous processing to another driver but could not find an option to queue an event into cache in that class, which seemed a bit odd, since that's an obvious third option that would make sense to offer.
Luckily Peter Lambrechtsen wrote and published a library to fill that gap a while a go on Cool Solutions, now available here. So I gave that a try and while it looked overall promising I soon ran into a known bug that needed fixing. And while I was at it, I added tracing support and an example Designer project for easy evaluation as well.
Downloads and source code are available at GitHub.