Added Form
This commit is contained in:
parent
fa13b0948e
commit
1c833b7521
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
|
||||
namespace Ooui
|
||||
{
|
||||
public class Form : Element
|
||||
{
|
||||
public event EventHandler Submitted {
|
||||
add => AddEventListener ("submit", value);
|
||||
remove => RemoveEventListener ("submit", value);
|
||||
}
|
||||
|
||||
public Form ()
|
||||
: base ("form")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,16 @@ namespace Ooui
|
|||
set => SetProperty (ref isDisabled, value, "disabled");
|
||||
}
|
||||
|
||||
public Form Form {
|
||||
get {
|
||||
var p = ParentNode;
|
||||
while (p != null && !(p is Form)) {
|
||||
p = p.ParentNode;
|
||||
}
|
||||
return p as Form;
|
||||
}
|
||||
}
|
||||
|
||||
public FormControl (string tagName)
|
||||
: base (tagName)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue