Vinesh Chauhan
Posts: 5
Joined: 2016-09-06
|
Hi,
I need your guidance in achieving below mentioned things.
I want to capture window event for specific domain website. In js file, there are window listener configured to capture event like click, form submit. Each event is bind with function that returns captured element details to record. How do I inject js file in website of particular domain ?
e.g.
window.addEventListener("click", this.onClickEvent, true); |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Vinesh,
Please try the code below.
mshtml.IHTMLScriptElement scriptObject =
(mshtml.IHTMLScriptElement)HTMLDocument.createElement("script");
scriptObject.type = @"text/javascript";
scriptObject.text = "
" + scriptText + "
";
((mshtml.HTMLBody)HTMLDocument.body).appendChild((mshtml.IHTMLDOMNode)scriptObject);
|
|