Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » JavaScript

removeEventListener when you don't know the object or functi

 
Jump to:  
 
Andrew Poulos
PostPosted: Mon Sep 01, 2008 9:32 am    Post subject: removeEventListener when you don't know the object or functi
       
Is there a way to call removeEventListener when you don't know what
events may have been added?

With something like
object.onclick = blah;
I could run through every element in the page, search for onclick and
set it to null.

When people use addEventListener and don't keep a record of the events
they add it to I don't know how to find them.

Andrew Poulos
 

 
Bjoern Hoehrmann
PostPosted: Mon Sep 01, 2008 1:09 pm    Post subject: Re: removeEventListener when you don't know the object or fu
       
* Andrew Poulos wrote in comp.lang.javascript:
Quote:
Is there a way to call removeEventListener when you don't know what
events may have been added?

No. You could try to override the addEventListener function before any
listener is added and use that information, or you could generate a list
of "all" probable event names and use them all, but other than that this
is not possible. Browser-internal APIs might help you, if this is for a
browser extension of some sort.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · LINK
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Jak pomnożyć źródła swoich dochodów Kate Ryan teledyski football stars Aktywne życie Bmibaby