Sha256: 3d369e73c12ff58564d1e9333d4275dd2ce6813a5105d6874fd6184499bb231d

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

module Glimmer
  module Opal
    class Shell
      def initialize(args)
        @args = args
        @children = []
        $document.ready do
          $document.body.replace(dom)
        end
      end      

      def text
        $document.title
      end

      def text=(value)
        $document.title = value
      end

      def add_child(child)
        return if @children.include?(child)
        @children << child
        dom << child.dom
      end

      def dom
        @dom ||= DOM {
          body {
          }
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glimmer-dsl-css-0.1.0 lib/glimmer/opal/shell.rb