I was writing a demo page for a custom iconset and was puzzled when it returned lots of stuff that was not icons at all.
It turns out the selector just looks for any element with an id-attribute, and I think that's a bit too lax. After I adjusted it to defs > g[id], it worked as I had expected it to, but then again, I don't know if this may ruin other stuff. Any comments?
_createIconMap: function() {
var icons = Object.create(null);
Polymer.dom(this).querySelectorAll('defs > g[id]')
.forEach(function(icon) {
icons[icon.id] = icon;
});
return icons;
},