summaryrefslogtreecommitdiffstats
path: root/src/polyfills/children.js
diff options
context:
space:
mode:
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
+ })
+}