In your (contained in the main page): window. A target origin should always be provided when possible, to avoid disclosing the data you send to any other site. The second argument to postMessage() can be '*' to indicate no preference about the origin of the destination. In your main page: const frame = document.getElementById('your-frame-id') į(/*any variable or object here*/, '') > Failure: different protocol, port & hostnameĮven though same-origin policy blocks scripts from accessing the content of sites with a different origin, if you own both the pages, you can work around this problem using window.postMessage and its relative message event to send messages between the two pages, like this: Here's what would happen trying to access the following URLs from URL RESULT Quite a high number of Origin users report that the Origin client won’t open or simply doesn’t respond when they try to play their games. NOTE: Internet Explorer is known to not strictly follow this rule, see here for details. Troubled with the Origin not loading problem and upon opening the app, a blank page appears and the encountering the Originnotloading the gamelibrary properly problem. Protocol, hostname and port must be the same of your domain if you want to access a frame. Origin is considered different if at least one of the following parts of the address isn't maintained: protocol:// hostname: port/. For the same-origin policy browsers block scripts trying to access a frame with a different origin. You can't access an with different origin using JavaScript, it would be a huge security flaw if you could do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |