summaryrefslogtreecommitdiffstats
path: root/src/polyfills/children.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-30 13:19:58 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-30 13:19:58 +0100
commitf4531868a190af69c4ecdcf6d7be6d3fc59f5d46 (patch)
tree1fc76780ad6918ef7b6eb0e302a55f1b043d8bc5 /src/polyfills/children.js
parentd64b964d21e1399b198e44555be68a12378053e7 (diff)
parentefc82b0eafa72902b35c2b22cd9e86bdbdd3edfb (diff)
downloadsvg.js-f4531868a190af69c4ecdcf6d7be6d3fc59f5d46.tar.gz
svg.js-f4531868a190af69c4ecdcf6d7be6d3fc59f5d46.zip
Merge branch '3.0.0' into 790-color-spaces
Diffstat (limited to 'src/polyfills/children.js')
-rw-r--r--src/polyfills/children.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/polyfills/children.js b/src/polyfills/children.js
new file mode 100644
index 0000000..98e9143
--- /dev/null
+++ b/src/polyfills/children.js
@@ -0,0 +1,8 @@
+import { filter } from '../utils/utils.js'
+
+// IE11: children does not work for svg nodes
+export default function children (node) {
+ return filter(node.childNodes, function (child) {
+ return child.nodeType === 1
+ })
+}