How to tell if the my addon script runs in a Compose window VS Message window?

I inject same script into both, using:

await browser.composeScripts.register({js: [{file: '/content_script/scroll_anywhere.js'}]});
await browser.messageDisplayScripts?.register({js: [{file: '/content_script/scroll_anywhere.js'}]});

How can I tell from the script where it’s running?
I’ve noticed compose window has location.href set to “about:blank?compose”, but this feels bad and unstable. Is there a better way?