escape html tag
parent
0ceaffc7b0
commit
7f8d508c00
|
@ -68,7 +68,7 @@ class Mechanize::Form
|
|||
elements_with "checkbox", "checkboxes"
|
||||
elements_with "button"
|
||||
|
||||
# Returns all fields of <input type="textarea">
|
||||
# Returns all fields of <input type="textarea">
|
||||
def textareas
|
||||
fields.select { |f| f.class == FormContent::Textarea }.map &.as(FormContent::Textarea)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This class represents button related html element.
|
||||
# <button>, and <input> whose type is button, reset, image, submit.
|
||||
# <button>, and <input> whose type is button, reset, image, submit.
|
||||
class Mechanize::FormContent::Button < Mechanize::FormContent::Field
|
||||
getter form_node : Node | Lexbor::Node
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This class represents <input type="checkbox">
|
||||
# This class represents <input type="checkbox">
|
||||
class Mechanize::FormContent::CheckBox < Mechanize::FormContent::RadioButton
|
||||
# set checkbox checked
|
||||
def check
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This class represents <input> elements in the form.
|
||||
# This class represents <input> elements in the form.
|
||||
class Mechanize::FormContent::Field
|
||||
# returns field's 'value' attribute
|
||||
property value : String?
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="hidden">
|
||||
# This class represents <input type="hidden">
|
||||
class Mechanize::FormContent::Hidden < Mechanize::FormContent::Field
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="image">
|
||||
# This class represents <input type="image">
|
||||
class Mechanize::FormContent::ImageButton < Mechanize::FormContent::Button
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "./option"
|
||||
|
||||
# This class represents <select multiple>
|
||||
# This class represents <select multiple>
|
||||
class Mechanize::FormContent::MultiSelectList
|
||||
getter node : Lexbor::Node
|
||||
getter name : String
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# This class represents <option> of <select>
|
||||
class Mechanize::FormContent::Option
|
||||
getter select_list : FormContent::MultiSelectList
|
||||
getter node : Lexbor::Node
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This class represents <input type="radio">
|
||||
# This class represents <input type="radio">
|
||||
class Mechanize::FormContent::RadioButton < Mechanize::FormContent::Field
|
||||
property :checked, :form
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="reset">
|
||||
# This class represents <input type="reset">
|
||||
class Mechanize::FormContent::ResetButton < Mechanize::FormContent::Button
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "./multi_select_list"
|
||||
|
||||
# This class represents <select> which is not multiple
|
||||
# This class represents <select> which is not multiple
|
||||
class Mechanize::FormContent::SelectList < Mechanize::FormContent::MultiSelectList
|
||||
def initialize(node)
|
||||
super node
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="submit">
|
||||
# This class represents <input type="submit">
|
||||
class Mechanize::FormContent::SubmitButton < Mechanize::FormContent::Button
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="text">
|
||||
# This class represents <input type="text">
|
||||
class Mechanize::FormContent::Text < Mechanize::FormContent::Field
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This class represents <input type="textarea">
|
||||
# This class represents <input type="textarea">
|
||||
class Mechanize::FormContent::Textarea < Mechanize::FormContent::Field
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue