get form name

This commit is contained in:
Kanezoh 2021-06-11 10:52:34 +09:00
parent e34f2e609d
commit 376ae24eee

View File

@ -6,6 +6,7 @@ class MechanizeCr::Form
getter checkboxes : Array(MechanizeCr::FormContent::CheckBox) getter checkboxes : Array(MechanizeCr::FormContent::CheckBox)
getter enctype : String getter enctype : String
getter method : String getter method : String
getter name : String
property action : String property action : String
def initialize(node : Node | Myhtml::Node) def initialize(node : Node | Myhtml::Node)
@ -15,7 +16,7 @@ class MechanizeCr::Form
@checkboxes = Array(MechanizeCr::FormContent::CheckBox).new @checkboxes = Array(MechanizeCr::FormContent::CheckBox).new
@action = node.fetch("action", "") @action = node.fetch("action", "")
@method = node.fetch("method", "GET").upcase @method = node.fetch("method", "GET").upcase
#@name = node['name'] @name = node.fetch("name", "")
#@clicked_buttons = [] #@clicked_buttons = []
#@page = page #@page = page
#@mech = mech #@mech = mech