- From: Ryosuke Niwa <notifications@github.com>
- Date: Mon, 07 Dec 2015 14:37:07 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Monday, 7 December 2015 22:37:52 UTC
That seems like a limitation of a specific browser testing framework. Also, you can quite reliably find elements that are visible and do not have a shadow root as follows: ```js function isElementVisibleAndWithoutShadowRoot(element) { var document.createElement('span'); span.textContent = 'some text'; span.style.fontSize = '10px'; span.style.display = 'inline'; span.style.position = 'relative'; // Add more styles to make it even more reliable. span.slot = '<some random string>'; element.appendChild(span); // span will not be distributed to any slot if elements has a shadow root. var rect = span.getBoundingClientRect(); return rect.width || rect.height; } ``` --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/354#issuecomment-162690993
Received on Monday, 7 December 2015 22:37:52 UTC