Skip to content

Commit 3204186

Browse files
authored
Merge pull request #1224 from arekdygas/issue-1219
INode.HasChildNodes is now exposed as a method to DOM
2 parents b278c49 + b5e80d5 commit 3204186

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/AngleSharp/Attributes/Accessors.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public enum Accessors : Byte
3131
/// <summary>
3232
/// Specifies that the method should be handled by an event remover.
3333
/// </summary>
34-
Remover = 0x10
34+
Remover = 0x10,
35+
/// <summary>
36+
/// Specifies that the getter only property should be handled by a method.
37+
/// </summary>
38+
Method = 0x20,
3539
}
3640
}

src/AngleSharp/Dom/INode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public interface INode : IEventTarget, IMarkupFormattable
198198
/// Gets an indicator if the element has any child nodes, or not.
199199
/// </summary>
200200
[DomName("hasChildNodes")]
201+
[DomAccessor(Accessors.Method)]
201202
[MemberNotNullWhen(true, nameof(ChildNodes), nameof(FirstChild), nameof(LastChild))]
202203
Boolean HasChildNodes { get; }
203204

0 commit comments

Comments
 (0)