changeset 1586:c05d5b640790

Safari fix for Specification node
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Fri, 05 Jun 2015 11:25:56 +0100
parents 7b49ca9e3c26
children c6ef0ce95e4a
files core.js
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Fri Jun 05 10:49:52 2015 +0100
+++ b/core.js	Fri Jun 05 11:25:56 2015 +0100
@@ -1026,9 +1026,13 @@
 		// On construction:
 		if (Collection.length != 0) {
 			Collection = Collection[0];
-			for (var i=0; i<Collection.childElementCount; i++) {
-				var child = Collection.children[i];
+			if (Collection.childElementCount != 0) {
+				var child = Collection.firstElementChild;
 				this.options.push(new this.OptionNode(child));
+				while (child.nextElementSibling != null) {
+					child = child.nextElementSibling;
+					this.options.push(new this.OptionNode(child));
+				}
 			}
 		}
 	};