W3C home > Mailing lists > Public > public-html@w3.org > January 2016

Allow Symbols as event names

From: Matthew Phillips <matthew@bitovi.com>
Date: Wed, 13 Jan 2016 21:36:20 -0500
Message-ID: <CAHm1x+baBjgAtG6zDckxvAUEDqwZsWo0bjK0X+3EbdCT22Utjg@mail.gmail.com>
To: public-html <public-html@w3.org>
This would allow private custom events, to avoid name collision.

var myEvent = Symbol('custom-event');

el.addEventListener(myEvent, fn);

var event = new CustomEvent(myEvent, { bubbles: true });
el.dispatchEvent(event);

-- 
Bitovi
Development | Design | Training | Open Source
Received on Thursday, 14 January 2016 02:36:52 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 14 January 2016 02:36:53 UTC