(Map|Set|WeakMap)#set() returns `this` ?

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Dec 5 09:53:35 PST 2012


nope

el.appendChild(document.createElement("another")).parentNode.appendChild(document.createElement("another"))
... etc

the way I use it is to add and address ... once again

var current = el.firstChild ||
el.appenChild(document.createElement("first"));

^_^





On Wed, Dec 5, 2012 at 9:26 AM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:

> On Wed, Dec 5, 2012 at 8:52 AM, Andrea Giammarchi
> <andrea.giammarchi at gmail.com> wrote:
> > and as last argument from my side, I **LOVE** the DOM appendChild method
> and
> > I use it a lot
> >
> > var div = document.body.appendChild(document.createElement("div"));
> >
> > This is the best example of "returning the value" I could think and the
> one
> > I use the most on daily basis.
>
> On the other hand, I find it constantly frustrating, because I always
> want to chain more operations (like more .appendChild() calls) off of
> it, and am instead forced to do them as separate statements. ^_^
>
> ~TJ
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121205/7a686b57/attachment-0001.html>


More information about the es-discuss mailing list