How can a web-component get its own styles (width etc) as soon as possible?
Consider the following test-element web component definition (vanilla JavaScript running on Google Chrome, not Polymer), that creates a simple component with width=500px . Its attachedCallback function outputs its width to the console, and then sets up an asynchronous delay to do it again: test-element.html <style> test-element { display: inline-block; width: 500px; } </style> <script> (function (window, document) { var proto = Object.create(HTMLElement.prototype); proto.attachedCallback = function () { // Direct output. console.log("(1) test-element.width = ", this.offsetWidth); // Delayed