origin
Summary
Gets the URL of the document of origin.
Property of dom/MessageEventdom/MessageEvent
Syntax
Note: This property is read-only.
var messageOrigin = event.origin;
Return Value
Returns an object of type StringString
The origin URL of the document that sent the message.
Notes
In cross-document messaging, this property represents the originating URI of the document that sent the message (typically the URI includes the scheme, host name, and port of the document, but not its path or fragment identifier).
Related specifications
- W3C HTML5
- Working Draft
- WHATWG HTML
- Living Standard
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]