Welcome Guest Search | Active Topics | Sign In | Register

getEventListeners is not defined Options
John
Posted: Wednesday, February 17, 2021 3:07:20 AM
Rank: Member
Groups: Member

Joined: 12/19/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 2:00:20 PM
Rank: Administration
Groups: Administration

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

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

Thanks!
John
Posted: Saturday, February 20, 2021 3:08:01 AM
Rank: Member
Groups: Member

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

Joined: 12/19/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 8:44:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
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.