opal/opal-jquery/document.rb in opal-jquery-0.1.2 vs opal/opal-jquery/document.rb in opal-jquery-0.2.0
- old
+ new
@@ -12,9 +12,17 @@
end
def title=(title)
`document.title = #{title}`
end
+
+ def head
+ Element.find(`document.head`)
+ end
+
+ def body
+ Element.find(`document.body`)
+ end
end
# TODO: this will be removed soon (here for compatibility)
$document = Document