Sha256: cbc7dbe82956713dfa51a33b3e0c61f5ac58987f9c06a4ca342d6b812fe25019

Contents?: true

Size: 989 Bytes

Versions: 1

Compression:

Stored size: 989 Bytes

Contents

# frozen_string_literal: true

generator = Genesis.generator

generator.build_render_method(:browser_touch) do |_value, proc|
  @browser_object.on :click do |e|
    instance_exec(e, &proc) if proc.is_a?(Proc)
  end
end

generator.build_render_method(:browser_play) do |value, proc|
  BrowserHelper.send("browser_play_#{@atome[:type]}", value, @browser_object, @atome, self, proc)
end

generator.build_render_method(:browser_time) do |value = nil, _proc|
  if value
    @browser_object.currentTime = value
  else
    @browser_object.currentTime
  end
end

generator.build_render_method(:browser_pause) do |_value, proc|
  instance_exec(@browser_object.currentTime, &proc) if proc.is_a?(Proc)
  @browser_object.pause
end

generator.build_render_method(:on) do |value, proc|
  @browser_object.on(value) do |e|
    instance_exec(e, &proc) if proc.is_a?(Proc)
  end
end

generator.build_render_method(:fullscreen) do |value, proc|
  atome_id=atome[:id]
  `atome.js_Fullscreen(#{atome_id})`
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atome-0.5.1.4 lib/atome/renderers/browser/event.rb