<fkchang>
adambeynon: elia this is how you embed opal-irb into lissio https://github.com/fkchang/opal-irb#lissio I will want to set this up for other kinds of opal apps, including an opal-rails plugin
RoxasShadowRS has quit [Quit: Leaving]
<elia>
fkchang, cool!
<elia>
fkchang, need any help for opal-rails?
<fkchang>
elia: probably when I get to it
DrShoggoth has quit [Quit: Leaving]
elia has quit [Ping timeout: 246 seconds]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
e_dub has quit [Ping timeout: 252 seconds]
e_dub has joined #opal
dleedev has quit [Quit: dleedev]
fkchang has quit [Ping timeout: 272 seconds]
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
e_dub has quit [Quit: It's a hard knock life]
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
kartouch has quit [Ping timeout: 276 seconds]
kartouch has joined #opal
Noldorin has quit []
Noldorin has joined #opal
Noldorin has quit [Read error: Connection reset by peer]
Noldorin has joined #opal
e_dub has joined #opal
e_dub has quit [Ping timeout: 245 seconds]
Noldorin has quit []
edub has joined #opal
edub has quit [Ping timeout: 245 seconds]
e_dub has joined #opal
e_dub has quit [Ping timeout: 245 seconds]
chesterbr has joined #opal
chesterbr has left #opal [#opal]
e_dub has joined #opal
e_dub has quit [Read error: No route to host]
ryanstout has quit [Quit: ryanstout]
dleedev has joined #opal
dleedev has quit [Quit: dleedev]
dimaursu16 has joined #opal
dimaursu16 has quit [Read error: Connection reset by peer]
dimaursu16 has joined #opal
e_dub has joined #opal
e_dub has quit [Ping timeout: 250 seconds]
RoxasShadowRS has joined #opal
dimaursu16 has quit [Ping timeout: 245 seconds]
elia has joined #opal
_elia has joined #opal
elia has quit [Ping timeout: 252 seconds]
kludge` has quit [Ping timeout: 272 seconds]
kludge` has joined #opal
dimaursu16 has joined #opal
wmnnd has joined #opal
<wmnnd>
Hey there, I'm trying to use the index() function from jQuery but Opal doesn't seem to recognize it: http://api.jquery.com/index/
<adambeynon>
wmnnd: hi. so, each method we want to use from jquery has to be exposed
<adambeynon>
Element.expose(:index) should do the trick
<wmnnd>
adambeynon: Do you call that on an instance or on the class?
<wmnnd>
Because if I use it on an instance, it says not a function, if I use it on Element, it says Illegal constructor.
GitHub147 has joined #opal
<GitHub147>
[opal-jquery] adambeynon pushed 1 new commit to master: http://git.io/LoEH9w
GitHub147 has left #opal [#opal]
<GitHub147>
opal-jquery/master ce26192 Adam Beynon: Fix Localstorage#[]= to return value
<adambeynon>
wmnnd: you should call it on Element itself
<adambeynon>
wmnnd: does that error come up when you call .expose(), or when you try to use it?
<wmnnd>
Ah, I see, it can only be called once.
<wmnnd>
adambeynon: Thank you, it works like a charm now :)
<adambeynon>
wmnnd: no problem :)
<wmnnd>
adambeynon: Why is it that not all functions are exposed by default?
<adambeynon>
wmnnd: quite a few return null, which means I have to write a wrapper which converts nil => null etc
<adambeynon>
interacting with js libs is really painfull
<adambeynon>
mainly the null vs. nil difference
<adambeynon>
wmnnd: also, we can only expose methods that are available when opal-jquery loads
<adambeynon>
if you add a plugin afterwards, then Element won't know about it
<wmnnd>
Okay, and how do I call native JS functions on instances of Element?
<wmnnd>
I have tried Native(`my_element.something`) but that doesn't work. Neither does Native(`$my_element.something`)
<adambeynon>
`my_element.something()`
<adambeynon>
you can put pure js inside the backtiks
<adambeynon>
not very pretty though
<wmnnd>
adambeynon: Is it different when I do this from a block?
<wmnnd>
I am specifically trying to access the event.target in the native JS.