contentWindow is not accessible cross-origin. A different app has a different origin.
If you added a mozbrowser iframe to the homescreen app, you could load your widget from a URL in that iframe and listen for the mozbrowsercontextmenu event on the iframe.
<iframe id="widget" mozbrowser=true></iframe>
var widget = document.getElementById('widget');
widget.addEventListener('mozbrowsercontextmenu', eventHandler);
See the browser app for an example of how to handle the contextmenu event https://github.com/mozilla-b2g/gaia/blob/master/apps/browser/js/browser.js#L1021
This would require adding the "browser" permission to homescreen app.
If you wanted to load it as an app then you'd need the mozapp attribute on the iframe too and would need to point to the manifest of the app. This is how the window manager in the system app embeds apps in an iframe.