Interact with javascript in iframe

Maddo7

Client
Регистрация
09.05.2015
Сообщения
130
Реакции
6
Баллы
18
I've got a case where an angularjs app uses an iframe for recaptchav2.
The iframe uses a javascript function to send the recaptcha result to the parent window using postMessage.

Then the angularjs app uses the token internally and adds it to the request it makes to the server.

How can I call the function in the iframe?
To execute Javascript "on the current page" does not seem to work.
 
I solved it by using
Код:
Развернуть Свернуть Копировать
Tab tab = instance.MainTab;

tab.AllDocuments.Documents[1].EvaluateScript("iframeFunction();");
 
  • Спасибо
Реакции: volody00 и Smok

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)