Sha256: 81d593d2bc1853f543d4579c9e7a9bb69a31799ca7251f5b80f9d790048357a7

Contents?: true

Size: 484 Bytes

Versions: 2

Compression:

Stored size: 484 Bytes

Contents

module Browser; module DOM

# Encapsulates an {Element} attribute.
class Attribute
  include Native

  # @!attribute [r] name
  # @return [String] the name of the attribute
  alias_native :name

  # @!attribute value
  # @return [String] the value of the attribute
  alias_native :value
  alias_native :value=

  # Returns true if the attribute is an id.
  if Browser.supports? 'Attr.isId'
    alias_native :id?, :isId
  else
    def id?
      name == :id
    end
  end
end

end; end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
diamonds-0.1.5 lib/diamonds/opal/browser/dom/attribute.rb
opal-browser-0.2.0 opal/browser/dom/attribute.rb