diff --git a/google-chart.html b/google-chart.html index 769fb77..6ff2229 100644 --- a/google-chart.html +++ b/google-chart.html @@ -75,7 +75,9 @@ * * Should be one of: * - `area`, `bar`, `bubble`, `candlestick`, `column`, `combo`, `geo`, - * `histogram`, `line`, `pie`, `scatter`, `stepped-area` + * `histogram`, `line`, `pie`, `scatter`, `stepped-area`, `table`, `gauge` + * + * * * See Google Visualization API reference (Chart Gallery) for details. * @@ -197,6 +199,25 @@ this.options = {}; this.rows = []; this.dataTable = null; + + var head = document.querySelector('head'); + var element = this; + var observer = new MutationObserver(function(mutations) { + mutations.forEach(function(mutation) { + for (var i = 0; i < mutation.addedNodes.length; i++) { + var newNode = mutation.addedNodes[i]; + if (newNode.rel && newNode.rel == 'stylesheet') { + //Add the stylesheet as an @import + var cssImport = document.createElement('style'); + cssImport.innerHTML = "@import '" + newNode.href + "';"; + element.shadowRoot.appendChild(cssImport); + } + } + }); + }); + + observer.observe(head, { subtree: false, characterData: false, childList: true }); + }, readyForAction: function(e, detail, sender) {