> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# postmessage-missing-origin-check

> postMessage targets '*', or a window message listener reads event.data without checking origin or source.

## What it flags

postMessage targets '\*', or a window message listener reads event.data without checking origin or source.

Literal bracket names such as `window['postMessage'](...)`, `window['addEventListener'](...)` and `event['origin']` are read like dot names. A listener that reads the event through a computed key is not reported.

Use `--include-contextual` to see sender-validation advice for listeners whose only proven effects are browser console output or a bounded iframe dimension update. A listener that grows application state, uses an unbounded dimension, or has another unverified effect remains in the default report. Check the sender independently of what the listener does with the message.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "postmessage-missing-origin-check": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.