Questions tagged [postmessage]

The window.postMessage() method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.

Cross-document messaging (aka postMessage) is an API introduced in the WHATWG HTML5 draft specification, allowing documents to communicate with one another across different origins, or source domains. Prior to HTML5, Web browsers disallowed cross-site scripting, to protect against security attacks.

See MDN Window.postMessage() API Reference

Related APIs

790 questions
-1
votes
1 answer

Get Vimeo video duration with manual api call

I simply want to get the duration of a vimeo video. I don't want to use froogaloop. The API states: "You interact with the player by sending a serialized JSON object with postMessage() to the . The following format should be used: { "method":…
Galbota
  • 63
  • 9
-1
votes
1 answer

IE passes an empty event object with PostMessage

All versions of IE do this. And all other browser work properly.. My code : window.addEventListener("message", receiveMessage, false); Which passes to : function receiveMessage(event) { console.log ( JSON.stringify( event ) ) ; Which, in…
Trip
  • 25,831
  • 41
  • 146
  • 260
-1
votes
1 answer

Sending Ctrl-Alt-Break from C#

I'm trying to send a Ctrl-Alt-Break sequence to an RDP ActiveX window in a WebBrowser control in order to make it fullscreen. I've searched the internet and tried numerous ways to accomplish this (PostMessage, keybd_event, SendMessage), and have not…
Michael S.
  • 305
  • 4
  • 16
-1
votes
1 answer

Post Message sending to the frame

I have a hidden frame that Accepted message, but I do not have to send by clicking. I'm calling the function that performs and actions, including sending a message. Function settimeout not satisfied by their speed. this.request = function…
Geray Suinov
  • 2,711
  • 3
  • 13
  • 19
-1
votes
1 answer

c# api named PostMessage

I'm trying to write an application that going to proccess and send him the keystrokes ctrl-a and then ctrl-c that i will have the text content in my clipboard. I read that the correct api is PostMessage`Sendmeesage`. with the api i success to write…
-1
votes
1 answer

Facebook login and posting with multiple accounts through my android app

In my android app I have multiple activities . I m lo-gin with Facebook and also i m able to post messages to Facebook wall and logout from facebook successfully.But when i login with another account I am able to logged in successfully but unable…
vimalatha
  • 63
  • 1
  • 10
-2
votes
3 answers

How is the LPARAM of PostMessage() constructed?

I'm having trouble with the parameter LPARAM of PostMessage(). This is a widely available example of the letter z being typed with PostMessage(): PostMessage(handle, WM_KEYDOWN, 0x5A, 0x002C0001) // key down for z PostMessage(handle, WM_KEYUP, 0x5A,…
John
  • 7
  • 4
-2
votes
1 answer

How to remove div in cross site div?

I have an iframe youtube video, where i want to remove an div element. I can do it in in the console as long I manually folded out the div which I am looking for, but otherwise i am not able to find it using document.getElementByClassName().. Is it…
anita
  • 185
  • 9
-2
votes
1 answer

Can't get MessageEvent properties

window.addEventListener('message', function (message) { console.log(message.data) // undefined } window.addEventListener('message', function (message) { var myMessage = message console.log(myMessage.data) // 'success get…
Yao Z
  • 3
  • 1
-3
votes
1 answer

Change src of parent window iframe

Suppose My Website is https://example.com I have loaded iframe inside that having src https://example2.com/iframe When my Iframe is loaded, then inside that iframe i have a button which redirect to https://example3.com. so example3 doesn't allow to…
Vikash
  • 2,847
  • 2
  • 17
  • 31
1 2 3
52
53