class React::SyntheticEvent
Public Class Methods
native_accessors(*js_names)
click to toggle source
helpers
# File lib/react/synthetic_event.rb, line 5 def self.native_accessors(*js_names) js_names.each do |js_name| ruby_name = js_name.underscore define_method(ruby_name) do @native.JS[js_name] end end end
native_boolean_accessors(*js_names)
click to toggle source
# File lib/react/synthetic_event.rb, line 14 def self.native_boolean_accessors(*js_names) js_names.each do |js_name| ruby_name = js_name.underscore + '?' define_method(ruby_name) do @native.JS[js_name] end end end
Public Instance Methods
current_target()
click to toggle source
# File lib/react/synthetic_event.rb, line 37 def current_target Browser::Element.new(@native.JS[:currentTarget]) end
native_event()
click to toggle source
# File lib/react/synthetic_event.rb, line 41 def native_event Browser::Event.new(@native.JS[:nativeEvent]) end
target()
click to toggle source
# File lib/react/synthetic_event.rb, line 49 def target Browser::Element.new(@native.JS[:target]) end