From 1953dbcdb44c6ae94e18501e8c1168e8fb8d71d8 Mon Sep 17 00:00:00 2001 From: wout Date: Sat, 21 Jun 2014 22:04:12 +0200 Subject: Documented and added specs for new selector method --- src/selector.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/selector.js') diff --git a/src/selector.js b/src/selector.js index 82aca37..ec6298a 100644 --- a/src/selector.js +++ b/src/selector.js @@ -6,9 +6,11 @@ SVG.get = function(id) { // Select elements by query string SVG.select = function(query, parent) { - return SVG.utils.map((parent || document).querySelectorAll(query), function(node) { - return SVG.adopt(node) - }) + return new SVG.Set( + SVG.utils.map((parent || document).querySelectorAll(query), function(node) { + return SVG.adopt(node) + }) + ) } SVG.extend(SVG.Parent, { -- cgit v1.2.3