From 4bd10f70b12d257141c3994a6bca9633731417da Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 15 Nov 2010 23:25:55 +0000 Subject: [PATCH] [agiow] (2) Revert r5277's removal of '/' as a magic value to postMessage(), since it has useful use cases. Paths in absolute URLs are still ignored without raising an exception. git-svn-id: http://svn.whatwg.org/webapps@5682 340c8d12-0b0e-0410-8428-c7bf67bfef74 --- complete.html | 16 ++++++++++++---- index | 16 ++++++++++++---- source | 18 +++++++++++++----- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/complete.html b/complete.html index f64608572ec..3c7337f6b56 100644 --- a/complete.html +++ b/complete.html @@ -72962,7 +72962,7 @@

10.4.3 Posting messages

send the message to the target regardless of origin, set the target origin to "*". To restrict the message to same-origin targets only, without needing to explicitly - state the origin, pass the window.location object.

+ state the origin, set the target origin to "/".

Throws an INVALID_STATE_ERR if the ports array is not null and it contains either null entries or duplicate ports.

@@ -72990,9 +72990,10 @@

10.4.3 Posting messages

  1. If the value of the targetOrigin argument - is neither a single U+002A ASTERISK character (*) nor an - absolute URL, then throw a SYNTAX_ERR - exception and abort the overall set of steps.

    + is neither a single U+002A ASTERISK character (*), a single U+002F + SOLIDUS character (/), nor an absolute URL, then + throw a SYNTAX_ERR exception and abort the overall + set of steps.

  2. @@ -73041,6 +73042,13 @@

    10.4.3 Posting messages

  3. +

    If the targetOrigin argument is a single + literal U+002F SOLIDUS character (/), and the + Document of the Window object on which + the method was invoked does not have the same origin + as the entry script's document, then abort these steps silently.

    +

    Otherwise, if the targetOrigin argument is an absolute URL, and the Document of the Window object on which the method was invoked does diff --git a/index b/index index dd346a33c93..b793094c0d6 100644 --- a/index +++ b/index @@ -69611,7 +69611,7 @@ function receiver(e) { send the message to the target regardless of origin, set the target origin to "*". To restrict the message to same-origin targets only, without needing to explicitly - state the origin, pass the window.location object.

    + state the origin, set the target origin to "/".

    Throws an INVALID_STATE_ERR if the ports array is not null and it contains either null entries or duplicate ports.

    @@ -69639,9 +69639,10 @@ function receiver(e) {
    1. If the value of the targetOrigin argument - is neither a single U+002A ASTERISK character (*) nor an - absolute URL, then throw a SYNTAX_ERR - exception and abort the overall set of steps.

      + is neither a single U+002A ASTERISK character (*), a single U+002F + SOLIDUS character (/), nor an absolute URL, then + throw a SYNTAX_ERR exception and abort the overall + set of steps.

    2. @@ -69690,6 +69691,13 @@ function receiver(e) {
    3. +

      If the targetOrigin argument is a single + literal U+002F SOLIDUS character (/), and the + Document of the Window object on which + the method was invoked does not have the same origin + as the entry script's document, then abort these steps silently.

      +

      Otherwise, if the targetOrigin argument is an absolute URL, and the Document of the Window object on which the method was invoked does diff --git a/source b/source index 192bb817421..fd084435975 100644 --- a/source +++ b/source @@ -82572,8 +82572,8 @@ function receiver(e) { send the message to the target regardless of origin, set the target origin to "*". To restrict the message to same-origin targets only, without needing to explicitly - state the origin, pass the window.location object.

      + state the origin, set the target origin to "/".

      Throws an INVALID_STATE_ERR if the ports array is not null and it contains either null @@ -82609,9 +82609,10 @@ function receiver(e) {

    4. If the value of the targetOrigin argument - is neither a single U+002A ASTERISK character (*) nor an - absolute URL, then throw a SYNTAX_ERR - exception and abort the overall set of steps.

      + is neither a single U+002A ASTERISK character (*), a single U+002F + SOLIDUS character (/), nor an absolute URL, then + throw a SYNTAX_ERR exception and abort the overall + set of steps.

    5. @@ -82664,6 +82665,13 @@ function receiver(e) {
    6. +

      If the targetOrigin argument is a single + literal U+002F SOLIDUS character (/), and the + Document of the Window object on which + the method was invoked does not have the same origin + as the entry script's document, then abort these steps silently.

      +

      Otherwise, if the targetOrigin argument is an absolute URL, and the Document of the Window object on which the method was invoked does