An object containing information about the script context that sent a message or request.

interface MessageSender {
    frameId?: number;
    id?: string;
    tab?: Tab;
    tlsChannelId?: string;
    url?: string;
}
Index
frameId?: number

The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set.

id?: string

The ID of the extension or app that opened the connection, if any.

tab?: Tab

The tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app.

tlsChannelId?: string

The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available.

Unsupported on Firefox at this time.

url?: string

The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it.