Sha256: fce238609c2b70821de2bf774911ba10d2de34696513cfb92acc3f350f38e433

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 Bytes

Contents

module Glimmer
  module Opal
    class DisplayProxy
      class << self
        def instance
          @instance ||= new
        end
      end
      
      def async_exec(&block)
        executer = lambda do
          if $document.at_css('.modal')
            sleep(0.05)
            Async::Task.new(&executer)
          else
            block.call
          end
        end
        Async::Task.new(&executer)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
glimmer-dsl-opal-0.0.9 lib/glimmer/opal/display_proxy.rb
glimmer-dsl-opal-0.0.8 lib/glimmer/opal/display_proxy.rb
glimmer-dsl-opal-0.0.7 lib/glimmer/opal/display_proxy.rb