This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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