PolymerElements / iron-icons

A set of icons for use with iron-icon
https://www.webcomponents.org/element/PolymerElements/iron-icons
105 stars 61 forks source link

Change the import order #17

Closed wibblymat closed 9 years ago

wibblymat commented 9 years ago

Ensures that elements are not upgraded before the default icon set is defined.

The current order of operations is:

  1. iron-icons.html is loaded
  2. This causes iron-icon.html to be imported, blocking the rest of the execution
  3. iron-icon is executed, upgrading any existing <iron-icon> elements
  4. iron-icons then resumes, defining the default icon set

If you load your elements asynchronously this fails if an existing icon uses the default icon set. The element is upgraded before the icon set is defined. This gives an error about the icon set not being imported.

wibblymat commented 9 years ago

Actually, this doesn't seem to help when you vulcanize. I guess the real solution is to make iron-icon wait for all imports to finish before looking for the right icon. Somehow.