The site has a chat that is displayed in the Iframe and is located on another domain. It is necessary in any way to warn the writing of the mat in the chat. The chat API does not allow this. I tried onkeyup on js, it does not work in the iframe, is it possible to somehow track what the user is writing to the chat and if there is a mate (there is a functionality), then hide the chat?)

  • Security policy will not allow. if on keyup to the document works - then you can try to prohibit pressing the next character, but in this case the keydown will work, since the keyup works after the character has already been entered - sivik_xes

1 answer 1

You cannot control elements with js inside an iframe, unless this same js code is inside it.