CometD library for CJS.
This is little more than taking the CometdD JavaScript library and making each component available via module.exports.
The org.cometd
namespace is not needed. Neither is jQuery!
However you need to set up the XHR yourself.
This is based on the CometD 3.0.3 JavaScript library.
Example
const CometD LongPollingTransport Transport bindReloadExtension = ; // You need to implement the XHR for the transports. { const transport = Transport; transport { const xhr = ; const data = JSON; xhr; xhr; xhr { if xhrreadyState === 4 if xhrstatus === 200 packet; else packet; }; xhr; }; return transport; } const cometd = ; // The bindX functions return the "org" object with the given extension "bound".const ReloadExtension = ; cometd;cometd; cometd; cometd;
References
cometd JavaScript library docs