deprecate .add/removeEventListener(...) in pro of .on/off(...)
# Jordan Harband (7 years ago)
Neither of these methods, nor the DOM itself, are part of the JS language standard - you might be thinking of the HTML standard.
Neither of these methods, nor the DOM itself, are part of the JS language
standard - you might be thinking of the HTML standard.
On Wed, Nov 28, 2018 at 11:28 AM manuelbarzi <manuelbarzi at gmail.com> wrote:
> make it shorter, simpler and more handy
>
> deprecate this
> ```
> EventTarget.addEventListener(...)
> EventTarget.removeEventListener(...)
> ```
>
> in pro of
> ```
> EventTarget.on(...)
> EventTarget.off(...)
> ```
>
> make it easier, more intuitive and more readable
> ```
> button.on(‘click’, e => ...)
> form.on('submit', e => ...)
> document.on('DOMContentLoaded', () => ...)
> ...
> ```
>
> (and reduce code length)
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20181128/fc9933c7/attachment-0001.html># Isiah Meadows (7 years ago)
It is part of the DOM itself: dom.spec.whatwg.org/#interface-eventtarget. Doesn't make this any more on-topic here, though.
Isiah Meadows contact at isiahmeadows.com, www.isiahmeadows.com
It *is* part of the DOM itself:
https://dom.spec.whatwg.org/#interface-eventtarget. Doesn't make this
any more on-topic here, though.
-----
Isiah Meadows
contact at isiahmeadows.com
www.isiahmeadows.com
On Wed, Nov 28, 2018 at 2:37 PM Jordan Harband <ljharb at gmail.com> wrote:
>
> Neither of these methods, nor the DOM itself, are part of the JS language standard - you might be thinking of the HTML standard.
>
> On Wed, Nov 28, 2018 at 11:28 AM manuelbarzi <manuelbarzi at gmail.com> wrote:
>>
>> make it shorter, simpler and more handy
>>
>> deprecate this
>> ```
>> EventTarget.addEventListener(...)
>> EventTarget.removeEventListener(...)
>> ```
>>
>> in pro of
>> ```
>> EventTarget.on(...)
>> EventTarget.off(...)
>> ```
>>
>> make it easier, more intuitive and more readable
>> ```
>> button.on(‘click’, e => ...)
>> form.on('submit', e => ...)
>> document.on('DOMContentLoaded', () => ...)
>> ...
>> ```
>>
>> (and reduce code length)
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss# Tab Atkins Jr. (7 years ago)
Jordan meant that DOM isn't part of the JS standard. ^_^ So yeah, not relevant to this list.
Jordan meant that DOM isn't part of the JS standard. ^_^ So yeah, not
relevant to this list.
On Wed, Nov 28, 2018 at 11:39 AM Isiah Meadows <isiahmeadows at gmail.com> wrote:
>
> It *is* part of the DOM itself:
> https://dom.spec.whatwg.org/#interface-eventtarget. Doesn't make this
> any more on-topic here, though.
>
> -----
>
> Isiah Meadows
> contact at isiahmeadows.com
> www.isiahmeadows.com
> On Wed, Nov 28, 2018 at 2:37 PM Jordan Harband <ljharb at gmail.com> wrote:
> >
> > Neither of these methods, nor the DOM itself, are part of the JS language standard - you might be thinking of the HTML standard.
> >
> > On Wed, Nov 28, 2018 at 11:28 AM manuelbarzi <manuelbarzi at gmail.com> wrote:
> >>
> >> make it shorter, simpler and more handy
> >>
> >> deprecate this
> >> ```
> >> EventTarget.addEventListener(...)
> >> EventTarget.removeEventListener(...)
> >> ```
> >>
> >> in pro of
> >> ```
> >> EventTarget.on(...)
> >> EventTarget.off(...)
> >> ```
> >>
> >> make it easier, more intuitive and more readable
> >> ```
> >> button.on(‘click’, e => ...)
> >> form.on('submit', e => ...)
> >> document.on('DOMContentLoaded', () => ...)
> >> ...
> >> ```
> >>
> >> (and reduce code length)
> >> _______________________________________________
> >> es-discuss mailing list
> >> es-discuss at mozilla.org
> >> https://mail.mozilla.org/listinfo/es-discuss
> >
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss# Isiah Meadows (7 years ago)
Oh okay. I misread his response, then.
Isiah Meadows contact at isiahmeadows.com, www.isiahmeadows.com
Oh okay. I misread his response, then.
-----
Isiah Meadows
contact at isiahmeadows.com
www.isiahmeadows.com
On Wed, Nov 28, 2018 at 2:56 PM Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>
> Jordan meant that DOM isn't part of the JS standard. ^_^ So yeah, not
> relevant to this list.
> On Wed, Nov 28, 2018 at 11:39 AM Isiah Meadows <isiahmeadows at gmail.com> wrote:
> >
> > It *is* part of the DOM itself:
> > https://dom.spec.whatwg.org/#interface-eventtarget. Doesn't make this
> > any more on-topic here, though.
> >
> > -----
> >
> > Isiah Meadows
> > contact at isiahmeadows.com
> > www.isiahmeadows.com
> > On Wed, Nov 28, 2018 at 2:37 PM Jordan Harband <ljharb at gmail.com> wrote:
> > >
> > > Neither of these methods, nor the DOM itself, are part of the JS language standard - you might be thinking of the HTML standard.
> > >
> > > On Wed, Nov 28, 2018 at 11:28 AM manuelbarzi <manuelbarzi at gmail.com> wrote:
> > >>
> > >> make it shorter, simpler and more handy
> > >>
> > >> deprecate this
> > >> ```
> > >> EventTarget.addEventListener(...)
> > >> EventTarget.removeEventListener(...)
> > >> ```
> > >>
> > >> in pro of
> > >> ```
> > >> EventTarget.on(...)
> > >> EventTarget.off(...)
> > >> ```
> > >>
> > >> make it easier, more intuitive and more readable
> > >> ```
> > >> button.on(‘click’, e => ...)
> > >> form.on('submit', e => ...)
> > >> document.on('DOMContentLoaded', () => ...)
> > >> ...
> > >> ```
> > >>
> > >> (and reduce code length)
> > >> _______________________________________________
> > >> es-discuss mailing list
> > >> es-discuss at mozilla.org
> > >> https://mail.mozilla.org/listinfo/es-discuss
> > >
> > > _______________________________________________
> > > es-discuss mailing list
> > > es-discuss at mozilla.org
> > > https://mail.mozilla.org/listinfo/es-discuss
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
make it shorter, simpler and more handy
deprecate this
in pro of
make it easier, more intuitive and more readable
(and reduce code length)
make it shorter, simpler and more handy deprecate this ``` EventTarget.addEventListener(...) EventTarget.removeEventListener(...) ``` in pro of ``` EventTarget.on(...) EventTarget.off(...) ``` make it easier, more intuitive and more readable ``` button.on(‘click’, e => ...) form.on('submit', e => ...) document.on('DOMContentLoaded', () => ...) ... ``` (and reduce code length) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20181128/ad40552b/attachment.html>