Welcome Guest Search | Active Topics | Sign In | Register

getEventListeners is not defined Options
John
Posted: Tuesday, February 16, 2021 10:07:20 PM
Rank: Member
Groups: Member

Joined: 12/18/2020
Posts: 14
When I try to use getEventListeners in EvalScript, getEventListeners is not defined error will occur.

var events = (string)webView.EvalScript(@"JSON.stringify(getEventListeners(document.forms[0]))");
eo_support
Posted: Wednesday, February 17, 2021 9:00:20 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,512
Hi,

getEventListeners is not a global function. It is on eoapi object. So you would need to use eoapi.getEventListeners.

Thanks!
John
Posted: Friday, February 19, 2021 10:08:01 PM
Rank: Member
Groups: Member

Joined: 12/18/2020
Posts: 14
How to use eoapi.getEventListeners within a webview?
John
Posted: Saturday, February 20, 2021 12:12:22 AM
Rank: Member
Groups: Member

Joined: 12/18/2020
Posts: 14
ok got it:

var events = (string)webView.EvalScript(@"JSON.stringify(eoapi.getEventListeners(document.forms[0]))");
eo_support
Posted: Monday, February 22, 2021 3:44:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,512
Great!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.