Closed dlee closed 10 years ago
$document["some_section"] #=> instance of Element class Section # not under Browser::DOM::Element end $document["some_section"] #=> instance of Section
I think this is a bug with Opal itself not doing module-scoped constant lookup here: https://github.com/opal/opal-browser/blob/master/opal/browser/dom/element.rb#L23
Actually, Opal is behaving properly. const_defined? and const_get return toplevel constants if there are none under the callee.
const_defined?
const_get
Uhh, nasty bug indeed. I'll get to it soon.
Fixed on master.
I think this is a bug with Opal itself not doing module-scoped constant lookup here: https://github.com/opal/opal-browser/blob/master/opal/browser/dom/element.rb#L23