opal/opal-jquery/document.rb in opal-jquery-0.0.8 vs opal/opal-jquery/document.rb in opal-jquery-0.0.9

- old
+ new

@@ -1,28 +1,13 @@ require 'opal-jquery/element' -$document = Element.find(`document`) +$document = Element.find($global.document) class << $document + # Use Element.ready? instead def ready?(&block) - %x{ - if (block === nil) { - return nil; - } - - $(block); - return nil; - } + Element.ready?(&block) end - - def title - `document.title` - end - - def title=(title) - `document.title = title` - end end -# Document is depreceated, use $document instead. +# TODO: this will be removed soon (here for compatibility) Document = $document -