【正文】
ould check the origin domain to ensure that messages are accepted from domains that they expect. Also note that the method provides no way for developers or browsers to match the origin domain with a list of allowable domains. This matching will need to be done by clientside script. For the origin site, authors should use the optional targetdomain argument in a confidential message. Internet Explorer 8 can then ensure that the message is delivered only to the intended recipient. What Developers Can Expect with CrossDocument Messaging ? Security. The technique works for semitrusted environments by letting developers choose to receive the message from the domain and discard it if the contents are not secure or expected. ? Reliability. The technique works consistently with no dropped messages, unlike the technique described previously for crossframe munication. ? Performance. The technique allows duplex munication without relying on the gadget or parent page creating additional proxy IFRAME elements, and without polling the URL for data. ? Easy to deploy. Service providers are not expected to provide serverside proxies or to channel content from server to server. This saves on implementation and hardware as well as bandwidth costs. Also reduced is the need for service providers to maintain SLAs with gadget developers. ? Standardized. One solution will work across all browsers that support it. ? No legacy impact. Being a new feature and not a workaround, this technique should not have unanticipated interaction with legacy code and functionality. Other Scenarios That This Feature Can Be Used For ? Authorization. Confidential information such as authorization tokens can be sent to ponents in the page. ? Sizing and positioning gadgets. An IFRAME element has dimensions set by its parent page. In scenarios with variable content, allowing an IFRAME element to request more dimensions will let the parent talk to other ponents. This will ensure that the parent can evaluate a potential request for a resize or relocation of the gadget. ? CSS Inheritance. Thirdparty content in an IFRAME element can receive the CSS sent using crossdocument messaging and apply the properties. Technologies That Enhance CrossDocument Messaging Scenarios The postMessage method currently has no facility for passing structured data of any kind between documents. We believe that if HTML and CSS that is sent using this feature could be safely displayed, the lives of Web developers who want to create pelling applications with this method would be greatly simplified. Other potential technologies that would work well with crossdocument messaging include JSON, which could be parsed safely and natively. Acknowledgments I would like to acknowledge the contributions of the members of the HTML mittee and thank the Internet Explorer 8 AJAX development and testing teams for implementing the draft in Beta 1. More resources can be found on the Internet Explorer Developer Center. The HTML mittee would love to hear feedback on the draft. You can send feedback directly to the Internet Explorer 8 feedback database on the Microsoft Connect Web site. Even better, send your thoughts to the HTML alias at publichtmlments@.