Metoda add

Přidá posluchače události.

typ: method; celé jméno: COMEX.HTML.EventListener.add;


Parametry:

$function

● hodnota typu Function

handler volané funkce

$id

● hodnota typu String (výchozí: undefined)

id, pod kterým bude posluchač zaregistrovaný

$priority

● hodnota typu Integer (výchozí: undefined)

priorita spouštění handlerů


Vrací:

bez návratové hodnoty

example
var $rslt = document.on("contextmenu");
$rslt.suppress();
$rslt.add(function(){alert('event alert 01')}, 'alert01');
$rslt.add(function(){alert('event alert 02')}, 'alert02');

( umístěno v souboru /comex/scripts/comex.js )


Metoda addMetoda enabledMetoda fireMetoda getMetoda preventMetoda remMetoda stopMetoda suppress