pretty-html-log icon indicating copy to clipboard operation
pretty-html-log copied to clipboard

[Question] Does phl print #shadow-root?

Open dereklin opened this issue 3 years ago • 4 comments
trafficstars

I am currently debugging a jest test where I am using phl on a component that renders a web component that uses #shadow-root. I am not seeing any #shadow-root or its children when using phl.

I am wondering if phl will print out #shadow-root like how it is displayed in chrome dev tool. (the web component might not be rendered correctly in the test)

dereklin avatar Nov 04 '22 19:11 dereklin

Looks like it doesn't. I was able to get more output using:

console.log(webComponent.nativeElement.shadowRoot.innerHTML);

dereklin avatar Nov 04 '22 20:11 dereklin

Thx a lot for reporting this. Can you try if it works when you enable comments printing? phl(fixture, true);

nivekcode avatar Nov 06 '22 19:11 nivekcode

Hi @kreuzerk , phl(fixture, true) is not printing out the shadowRoot either

dereklin avatar Nov 07 '22 00:11 dereklin

I am also looking for this feature

pct-cclausen avatar Jul 31 '23 09:07 pct-cclausen