Sha256: 0998b8f75162a8ec91e45c7a0b6939df36aa43434112d07caa8e8be1fc9f0afb

Contents?: true

Size: 320 Bytes

Versions: 9

Compression:

Stored size: 320 Bytes

Contents

require 'bowser/element'

module Bowser
  class Element
    element :canvas do
      def context(type='2d')
        Context.new(`#@native.getContext(#{type})`)
      end

      class Context
        include DelegateNative

        def initialize native
          @native = native
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bowser-1.1.3 opal/bowser/element/canvas.rb
bowser-1.1.0 opal/bowser/element/canvas.rb
bowser-1.0.5 opal/bowser/element/canvas.rb
bowser-1.0.4 opal/bowser/element/canvas.rb
bowser-1.0.3 opal/bowser/element/canvas.rb
bowser-1.0.2 opal/bowser/element/canvas.rb
bowser-1.0.1 opal/bowser/element/canvas.rb
bowser-1.0.0 opal/bowser/element/canvas.rb
bowser-0.5.4 opal/bowser/element/canvas.rb