Interact with javascript in iframe

Maddo7

Client
Регистрация
09.05.2015
Сообщения
109
Благодарностей
5
Баллы
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.
 

Maddo7

Client
Регистрация
09.05.2015
Сообщения
109
Благодарностей
5
Баллы
18
I solved it by using
Код:
Tab tab = instance.MainTab;

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

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