Gillice: so by calling it.

Desler: I’ve tried this in Babel REPL and Node v4 REPL, but neither works. import moment from

Kueny: I’ve tried this in Babel REPL and Node v4 REPL, but neither works. import moment from ‘moment’; moment // Undefined!

Vafiadis: Gets stored in a data attribute on the DOM elements themselves, ***ociated with the directive used on the element, since they’re meant to be view-models

Hardan: Hmm nice, didn’t know this

Kalkman: Gillice: you can think of it like this: function $node { return { nodes: node, val: function { return this.nodes0.value; } }; }

Kalkman: There’s a lot more to the $ function but that’s one use case

Lango: Im drinkin almond milk, u mad californians?

Kuhner: Kalkman: well yes, of course

Lango: I thought almond farmers were exacerbating your droughts

Sherburn: Kalkman: I just didn’t know you could keep interacting with the actual DOM like that

Vafiadis: ES6 maps make for a great way to cache jquery selectors btw

Kalkman: Var foo = do***ent.querySelector’#foo’;

Vafiadis: Because you can cache them by actual dom nodes, by the selector you use, etc

Kalkman: Foo always point to the DOM node at its current state

Kalkman: If I type into the box, foo.value updates

Schoenborn: Figured you’d just make an ineffective copy of the DOM and update something you aren’t seeing

Bellanger: Guess I should’ve given that some more thought at some point

Jolliffe: I suspect there are lots of cool things you can do with maps that I don’t know about

Grabau: Yeah, jquery is mainly about doing things with collections of DOM nodes specifically elements

Lango: Less thoughts, more trust, that is jQuery way

Vafiadis: The one downside to caching is that it won’t auto-update if you’re using a string selector and more matching elements are added

Lango: That’s why you’re not caching a selector, you’re caching a selection

Vafiadis: And to be fair it does do some nifty optimizations

Kalkman: Good way to put it mmmveggies

Vafiadis: Though from what understand, you can just as easily use jquery’s underlying engine without any of the fluff

Vafiadis: I always forget what it’s called – I haven’t done this, myself

Lango: But would just have you do $new = $$old.selector to refresh

Kalkman: It doesn’t have quite all the selectors

Kalkman: Some of them are routed through jquery stuff

Vafiadis: But a nice barebones group of them

Kalkman: I think most of the ones that querySelector can’t do sizzle can’t do either sadly

Pujals: Kalkman: so what exactly are you doing differently when you call an action on $foo rather than $foo? you’re no longer trying to find it in the DOM?

Kalkman: So it’s not got as much use anymore

Vafiadis: I should start doing that. I never want to use any of jquery’s convenience methods anyway, just its nature as an improved selector shim

Kalkman: Gillice: you aren’t invoking the jQuery method, which takes up time

Vafiadis: Kalkman: oh, so jquery works past sizzle for those?

Vafiadis: Like does all kindsa querySelector stuff that sizzle doesn’t?

Vafiadis: Then what’s the point of sizzle? BAH

Niewieroski: Kalkman: you’re just pointing directly to the methods available to that element?

Kalkman: Vafiadis: yeah it shims itself over top. like for instance foo.find’ .direct-child’

Rozeboom: Gillice: you’re doing something to each of the elements in one call

Kalkman: You can’t do that in sizzle or querySelector

Kalkman: Gillice: jQuerynode simply returns an object with some methods on it, for instance val

Kalkman: Gillice: so by calling it multiple times, you’re composing a new object each time