A method of modifying a first webpage from a first domain to enable cross-domain two-way communication is disclosed. The method comprising causing a web browser to load, as part of the first webpage, dynamic content comprising a UI; to embed an iFrame into the first webpage that contains a second webpage from a second domain different from the first domain; to load a script file from within the iFrame; to bind one or more functions defined by the script file to the UI; to, in response to the user interacting with the UI, using the one or more functions to send a message to the second domain; and to, after receiving a response from a server at the second domain, update the UI in response to the received response. The method also enables a seamless, cross-domain user interface that maintains synchronization between webpages on different domains.
展开▼