This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17481 - Not clear what "script that invoked the method" means exactly. Should this be changed to "entry script" instead? If not, please specify what it means.
Summary: Not clear what "script that invoked the method" means exactly. Should this be...
Status: RESOLVED DUPLICATE of bug 18242
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 12:59 UTC by contributor
Modified: 2013-02-13 00:46 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-06-13 12:59:15 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html
Multipage: http://www.whatwg.org/C#posting-messages
Complete: http://www.whatwg.org/c#posting-messages

Comment:
Not clear what "script that invoked the method" means exactly. Should this be
changed to "entry script" instead? If not, please specify what it means.

Posted from: 2001:4c28:a030:30:fdc9:a7c:a388:2bea by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64
Comment 1 Simon Pieters 2012-06-20 06:58:55 UTC
So we have a site compat issue here. Yahoo Mail requires the following to alert true

 a.html: 
 <iframe src=b.html></iframe> 
 <script> 
 function A() { window[0].B(); } 
 onload = A; 
 onmessage = function(e) { alert(e.source === window[0]); }; 
 </script> 

 b.html: 
 <script> 
 function B() { parent.postMessage('foo', '*'); } 
 </script>

That is, .source should be the window of the function that calls postMessage (even if that function was called from another window). The same logic should apply to .origin.
Comment 2 contributor 2012-07-18 17:48:33 UTC
This bug was cloned to create bug 18242 as part of operation convergence.
Comment 3 Ian 'Hixie' Hickson 2012-09-24 03:26:51 UTC
That's what the "script that invoked the method" is. Why is this ambiguous? The concept of a "script" is defined in quite excruciating detail...
Comment 4 Ian 'Hixie' Hickson 2012-12-02 03:35:07 UTC
zcorpan: Can you elaborate on what you'd like the spec to say? Would hyperlinking "script" to concept-script be enough?
Comment 5 Simon Pieters 2012-12-03 10:41:20 UTC
Yeah, I think so.
Comment 6 Ian 'Hixie' Hickson 2013-02-13 00:46:00 UTC

*** This bug has been marked as a duplicate of bug 18242 ***