Module: Taka::DOM::HTML::InputElement
- Includes:
- FieldSetElement
- Defined in:
- lib/taka/dom/html/input_element.rb
Instance Attribute Summary collapse
-
#defaultChecked ⇒ Object
Returns the value of attribute defaultChecked.
-
#defaultValue ⇒ Object
Returns the value of attribute defaultValue.
Class Method Summary collapse
Instance Method Summary collapse
- #blur ⇒ Object
- #checked ⇒ Object
- #click ⇒ Object
- #focus ⇒ Object
- #maxLength ⇒ Object
- #name ⇒ Object
- #select ⇒ Object
- #tabIndex ⇒ Object
- #type ⇒ Object
Methods included from FieldSetElement
Instance Attribute Details
#defaultChecked ⇒ Object
Returns the value of attribute defaultChecked.
7 8 9 |
# File 'lib/taka/dom/html/input_element.rb', line 7 def defaultChecked @defaultChecked end |
#defaultValue ⇒ Object
Returns the value of attribute defaultValue.
7 8 9 |
# File 'lib/taka/dom/html/input_element.rb', line 7 def defaultValue @defaultValue end |
Class Method Details
.extended(input) ⇒ Object
10 11 12 13 |
# File 'lib/taka/dom/html/input_element.rb', line 10 def extended input input.defaultValue ||= input['value'] input.defaultChecked = !!input['checked'] end |
Instance Method Details
#blur ⇒ Object
36 37 |
# File 'lib/taka/dom/html/input_element.rb', line 36 def blur end |
#checked ⇒ Object
16 17 18 |
# File 'lib/taka/dom/html/input_element.rb', line 16 def checked !!self['checked'] end |
#click ⇒ Object
45 46 47 |
# File 'lib/taka/dom/html/input_element.rb', line 45 def click self['checked'] = checked ? nil : 'checked' end |
#focus ⇒ Object
39 40 |
# File 'lib/taka/dom/html/input_element.rb', line 39 def focus end |
#maxLength ⇒ Object
20 21 22 |
# File 'lib/taka/dom/html/input_element.rb', line 20 def maxLength self['maxlength'].to_i end |
#name ⇒ Object
24 25 26 |
# File 'lib/taka/dom/html/input_element.rb', line 24 def name self['name'] end |
#select ⇒ Object
42 43 |
# File 'lib/taka/dom/html/input_element.rb', line 42 def select end |
#tabIndex ⇒ Object
28 29 30 |
# File 'lib/taka/dom/html/input_element.rb', line 28 def tabIndex self['tabindex'].to_i end |
#type ⇒ Object
32 33 34 |
# File 'lib/taka/dom/html/input_element.rb', line 32 def type self['type'] end |