forked from jamietre/CsQuery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7a6b28
commit 7e42bd7
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace CsQuery | ||
{ | ||
/// <summary> | ||
/// An HTML BUTTON element. | ||
/// </summary> | ||
/// | ||
/// <url> | ||
/// http://dev.w3.org/html5/markup/button.html | ||
/// </url> | ||
|
||
public interface IHTMLButtonElement : IDomElement | ||
{ | ||
/// <summary> | ||
/// The form with which to associate the element. | ||
/// </summary> | ||
|
||
IHTMLFormElement Form {get;} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
source/CsQuery/Dom/Implementation/HtmlElements/HTMLButtonElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using CsQuery.Dom.Implementation.HtmlElements; | ||
using CsQuery.HtmlParser; | ||
|
||
namespace CsQuery.Implementation | ||
{ | ||
/// <summary> | ||
/// An HTML button element. | ||
/// </summary> | ||
|
||
public class HTMLButtonElement : FormReassociateableElement, IHTMLButtonElement | ||
{ | ||
/// <summary> | ||
/// Default constructor. | ||
/// </summary> | ||
|
||
public HTMLButtonElement() | ||
: base(HtmlData.tagBUTTON) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// The value of the "type" attribute. For button elements, this property always returns a | ||
/// lowercase value and defaults to "submit" if there is no type attribute. | ||
/// </summary> | ||
/// | ||
/// <value> | ||
/// The type. | ||
/// </value> | ||
|
||
public override string Type | ||
{ | ||
get | ||
{ | ||
return GetAttribute(HtmlData.attrTYPE, "submit").ToLower(); | ||
} | ||
set | ||
{ | ||
base.Type = value; | ||
} | ||
} | ||
} | ||
} |