Created
September 6, 2018 11:36
-
-
Save Artur-/12c49be24638589e6613b6527f690183 to your computer and use it in GitHub Desktop.
Finds missing import statements for custom elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findMissingImports = (element) => { | |
if (element.tagName.indexOf('-') != -1 && !customElements.get(element.tagName.toLowerCase())) { | |
console.error("Element "+element.tagName+" is not upgraded"); | |
} | |
Array.from(element.children).forEach(e => findMissingImports(e)); | |
if (element.shadowRoot) { | |
Array.from(element.shadowRoot.children).forEach(e => findMissingImports(e)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment