Sha256: 303eb0c42a6337622031eadc4c336db5d55481bd70a4e8a3f10c56ff552c6420

Contents?: true

Size: 506 Bytes

Versions: 7

Compression:

Stored size: 506 Bytes

Contents

module Browser; module DOM

# Encapsulates an {Element} attribute.
class Attribute
  include Browser::NativeCachedWrapper

  # @!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

7 entries across 7 versions & 2 rubygems

Version Path
opal-browser-0.3.5 opal/browser/dom/attribute.rb
opal-browser-0.3.4 opal/browser/dom/attribute.rb
atome-opal-browser-0.3.9.5 opal/browser/dom/attribute.rb
opal-browser-0.3.3 opal/browser/dom/attribute.rb
opal-browser-0.3.2 opal/browser/dom/attribute.rb
opal-browser-0.3.1 opal/browser/dom/attribute.rb
opal-browser-0.3.0 opal/browser/dom/attribute.rb