aboutsummaryrefslogtreecommitdiff
path: root/lib/xmlreader.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-27 16:54:42 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-27 16:54:42 +0100
commit54c5c0ee38eb915275be4b0713fcaafb56033ac3 (patch)
treeb4f08f49fb83dabbd4abbe89ace4f9e4a1dfc912 /lib/xmlreader.js
parentda8ef999085c7f229da25673a2b4fbf908c7a3f0 (diff)
Handle w:drawing elements with no children
Diffstat (limited to 'lib/xmlreader.js')
-rw-r--r--lib/xmlreader.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xmlreader.js b/lib/xmlreader.js
index 3fde762..08347c4 100644
--- a/lib/xmlreader.js
+++ b/lib/xmlreader.js
@@ -97,3 +97,9 @@ Element.prototype.first = function(name) {
return child.name == name;
});
}
+
+Element.prototype.getElementsByTagName = function(name) {
+ return _.filter(this.children, function(child) {
+ return child.name == name;
+ });
+};