Skip to content

Instantly share code, notes, and snippets.

@davidrleonard
Last active May 25, 2017 17:13
Show Gist options
  • Save davidrleonard/e158ca8957c6db72c8ebae27b71073dd to your computer and use it in GitHub Desktop.
Save davidrleonard/e158ca8957c6db72c8ebae27b71073dd to your computer and use it in GitHub Desktop.
Get an icon's source SVG from Polymer `iron-iconset-svg`
// You need to have already loaded an `iron-iconset-svg` tag on the page
var iconDb = Polymer.Base.create('iron-meta', {type:'iconset'});
var pxIconSet = iconDb.byKey('px');
var airplaneIconSvg = pxIconSet._cloneIcon('aircraft', false); // ... `airplaneIconSvg` now has an `<svg>` node with the icon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment