Skip to content

Commit

Permalink
added numChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Mar 17, 2016
1 parent ecb0a63 commit 2880b8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cdb/jq/Dom.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Dom {

public var nodeName(default, null) : String;
public var nodeValue(default, null) : String;
public var numChildren(get, never) : Int;
var id : Int;
var client : Client;
var attributes : Array<{ name : String, value : String }>;
Expand All @@ -46,6 +47,8 @@ class Dom {
style = [];
}

inline function get_numChildren() return childs.length;

inline function send(msg) {
if( id < 0 ) throw "Can't change disposed node";
client.send(msg);
Expand Down

0 comments on commit 2880b8e

Please sign in to comment.