I've just spent a couple of hours tracking down a layout bug that turned
out to be a missing core-header-panel import. I am always nervous about
missing imports when coding Polymer. So I wrote a little utility that
reports unresolved HTML elements as errors. In case anyone else finds it
useful, here is the script:
function findUnknownElements(el) {
if (el.constructor == HTMLElement)
console.error("Found unknown element:", el);
if (el.shadowRoot) {
var every = el.shadowRoot.querySelectorAll('*');
for (var i=0; i<every.length; i++)
findUnknownElements(every[i]);
}
}
document.addEventListener('polymer-ready', function() {
var every = document.querySelectorAll('*');
for (var i=0; i<every.length; i++)
findUnknownElements(every[i]);
});
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/9b4ed352-5167-4473-9bba-f3ac2b67c7a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.