-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tidy up the window.postMessage algorithm further #1586
Conversation
* Makes the origin-checking logic clearer by consolidating the logic that determines targetOrigin in one place. * Since an environment settings object's origin is its responsible document's origin, we can just use the former phrase. * Since the default action concept is not supposed to exist (#805), we don't need to say there's no default action. * Save "this Window object" as targetWindow, since it isn't really meaningful once we've returned from the method and started running steps in parallel. * Consistently use camelCase variables, since that seems to be the way things are heading these days.
window, in same-origin cases. See discussion at | ||
https://github.com/whatwg/html/issues/1542#issuecomment-233502636 --> | ||
|
||
<li><p>If <var>targetOrigin</var> is a single U+002F SOLIDUS character (/), set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then*
Went ahead and did a bunch of consistification/tidying of the other two postMessages. Best to review the output probably. New commit message proposal:
|
<var>transfer</var>)</code></dfn> method on a <code>Window</code> object, the user agent must | ||
follow these steps:</p> | ||
<p>The <dfn><code data-x="dom-window-postMessage">postMessage(<var>message</var>, | ||
<var>targetOrigin</var>, <var>transfer</var>)</code></dfn> method on a <code>Window</code> object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
object, when invoked,*
LGTM % modulo nits. |
that determines targetOrigin in one place.
document's origin, we can just use the former phrase.
don't need to say there's no default action.
meaningful once we've returned from the method and started running
steps in parallel.
things are heading these days.