Could we use `this.frame.dispatchEvent` instead of `window.dispatchEvent`?
Also I don't think you need `detail`...

See https://github.com/alivedise/gaia/blob/activity-window/apps/system/js/window.js#L719 for reference.