These are chat archives for opal/opal

Nov 2014
Ryan Stout
Nov 21 2014 00:00
hey everyone. I gave opal a pretty good promotion in my rubyconf talk (should be on video in the next month @confreaks)
quick question
what's the best way to detect that I have an opal object (as opposed to a normal JS object)
Jared White
Nov 21 2014 00:44
At one point before I was checking for the presence of _klass (aka typeof xyz['_klass'] != 'undefined') but it looks like that was recently refactored away so that approach is probably not wise. Is there some common method on Object that can be checked instead maybe?
Damian Esteban
Nov 21 2014 05:38
So I'm starting to like Opal. Any time-frame on when Fire will be useable?
Elia Schito
Nov 21 2014 08:58
should be on video in the next month
@ryanstout can't wait
@ryanstout @jaredcwhite _klass and other internal properties have all been refactored to use a double dollar prefix instead, so it's still there, but named $$class
that said, another way to check is to require "native" and use #native? which is defined on Kernel and thus available everywhere
Elia Schito
Nov 21 2014 17:17
@adambeynon @meh that’s how they do it, just saying
Adam Beynon
Nov 21 2014 17:22
@elia interesting, haven’t seen that before
I assumed they didnt use a proxy
Elia Schito
Nov 21 2014 17:25
@adambeynon didn’t read in detail, but seems that we do better already :)
Jared White
Nov 21 2014 17:56
@elia Thanks for the tip! I'll check that out :)