🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39487

addEventListener i removeEventListener

#39487
From: koszu28
Date: Mon, 17 Apr 2006 09:35
15 lines
1218 bytes
Witam serdecznie.
Mam oto taki przycisk:
<button id="new" label="Nowy"/>

Dodaje do elementu zdarzenia:

getById("new").addEventListener('command',function() 
{alert('pierwsze')},false)
getById("new").addEventListener('command',function() 
{alert('drugie')},false)

Oto moje pytanie:
Jak pozbyc sie zdarzen z XULElement nie wiedzac o nich nic.
taki zapis teoretycznie powinien usunac wszystkie zdarzenia oncommand z 
elementu button: getById("new").removeEventListener('command');
Technical Details
Message-ID: <e1vnh0$qhj$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: koszu28 <koszu28@interia.pl>
Newsgroups: pl.comp.lang.javascript
Subject: addEventListener i removeEventListener
Date: Mon, 17 Apr 2006 11:35:26 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 15
Message-ID: <e1vnh0$qhj$1@inews.gazeta.pl>
NNTP-Posting-Host: host-81-190-138-77.olsztyn.mm.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1145266529 27187 81.190.138.77 (17 Apr 2006 09:35:29 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Mon, 17 Apr 2006 09:35:29 +0000 (UTC)
X-User: koszu28
User-Agent: Thunderbird 1.5 (Windows/20051201)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit