Changeset View
Changeset View
Standalone View
Standalone View
source/qml/lib/annotate.js
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 63 | if (node.children[i].children.length) { | |||
---|---|---|---|---|---|
65 | var child = new An(node.children[i]); | 65 | var child = new An(node.children[i]); | ||
66 | result.concat(child.find(selector)); | 66 | result.concat(child.find(selector)); | ||
67 | } | 67 | } | ||
68 | } | 68 | } | ||
69 | } | 69 | } | ||
70 | return result; | 70 | return result; | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | An.prototype.inspect = function() { | ||||
74 | for (var member in this.nodes[0]) { | ||||
75 | if (typeof this[member] !== "function") { | ||||
76 | console.log(member + ": " + this[member]); | ||||
77 | } | ||||
78 | } | ||||
79 | return this; | ||||
80 | } | ||||
81 | | ||||
73 | // Search only direct children | 82 | // Search only direct children | ||
74 | An.prototype.children = function(selector) { | 83 | An.prototype.children = function(selector) { | ||
75 | var result = new An(); | 84 | var result = new An(); | ||
76 | 85 | | |||
77 | if (typeof selector === "string") { | 86 | if (typeof selector === "string") { | ||
78 | selector = new Select(selector); | 87 | selector = new Select(selector); | ||
79 | } | 88 | } | ||
80 | 89 | | |||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |