I recreate an h2-element here:
<link rel="import" href="../../js/lib/polymer/polymer.html">
<dom-module id="x-custom">
<style>
h2 { color: green; }
</style>
<template>
<div id="content">
<h2>TEST</h2>
</div>
</template>
<script>
(function() {
Polymer({
is: 'x-custom',
ready: function() {
this.$.content.innerHTML = '<h2>TEST 2</h2>';
this.updateStyles();
}
});
})();
</script>
</dom-module>
If I skip the ready-function "TEST" is green, but not "TEST 2". Thought updateStyles()
may fix this, but didn't. Any ideas why this doesn't work? (Polymer 1.0, Chrome 44)