lib/opal/jquery/window.rb in opal-jquery-0.4.3 vs lib/opal/jquery/window.rb in opal-jquery-0.4.4
- old
+ new
@@ -4,10 +4,11 @@
# {Window} instances are {Native} objects used to wrap native window instances.
#
# Generally, you will want to use the top level {::Window} instance, which
# wraps `window` from the main page.
class Window
- include Native
+ # In more recent Opal versions Native::Wrapper should be used
+ include defined?(Native::Wrapper) ? Native::Wrapper : Native
# Returns this {Window} instance wrapped as an {Element}. Useful for
# delegating jQuery events, which allows the use of `window` as target.
#
# @return [Element]