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

863 questions
-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
  • 17
-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
  • 3,521
  • 3
  • 16
  • 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
1 answer

Alter Keystate of Shift while using PostMessage

I'm currently trying to experiment with using PostMessage. I got the hang of how to use it and apply different keys and such but I've met a problem: When using PostMessage while I myself am pressing Shift or Ctrl, it will be a combined Keypress of…
Hoesl
  • 13
  • 6
-2
votes
1 answer

Can you differentiate between multiple variables using an addEventListener (javascript)?

Basically, I want to do something like this: var a = 3; var b = 4; postMessage(a, '*'); postMessage(b, '*'); Then have a listener do something like this: addEventListener('message', event => { sessionStorage.setItem("variable…
-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
  • 193
  • 10
-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
  • 3,391
  • 2
  • 23
  • 39
1 2 3
57
58