<!doctype html>
<meta charset="utf-8" />
<meta name="author" title="Keith Cirkel" href="mailto:wpt@keithcirkel.co.uk" />
<link rel="help" href="https://open-ui.org/components/invokers.explainer/" />
<div id="target"></div>

<script type="module">
  const commandEvent = new CommandEvent('command', { bubbles: true });
  document.body.addEventListener('command', e => {
    e.source.toString();
  });
  target.addEventListener('command', e => {
    e.source.toString();
  });
  target.dispatchEvent(commandEvent);