Class: Browser::DOM::Attribute

Inherits:
Object
  • Object
show all
Includes:
Native
Defined in:
opal/browser/dom/attribute.rb

Overview

Encapsulates an Element attribute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameString (readonly)

Returns the name of the attribute.

Returns:

  • (String)

    the name of the attribute



9
# File 'opal/browser/dom/attribute.rb', line 9

alias_native :name

#valueString

Returns the value of the attribute.

Returns:

  • (String)

    the value of the attribute



13
# File 'opal/browser/dom/attribute.rb', line 13

alias_native :value

Instance Method Details

#id?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'opal/browser/dom/attribute.rb', line 20

def id?
  name == :id
end