Shadow DOM support for Ember #704
Replies: 6 comments 4 replies
-
hey @c69-addepar 👋 Checking the error shared by you
This seems to be coming from internal scripts, and this shouldn't cause errors in taking snapshots imo. I checked the changes in your percy-ember fork https://github.com/Addepar/percy-ember/pull/1/files, we'll be happy to merge this change upstream. though I couldn't understand the difference between could you share a small reproducible sample for us to debug, we'd do regression on our end. |
Beta Was this translation helpful? Give feedback.
-
Hi @itsjwala, The problem with preprocessing the DOM with Using It's also possible (though too complex IMO) to preserve the rounding-tripping through HTML behavior if necessary using something like let html = $scope.getInnerHTML({includeShadowRoots: true});
// $body.innerHTML = html; // for security reasons, this doesn't work in browsers
let fragment = new DOMParser().parseFromString(html, 'text/html', { includeShadowRoots: true });
$body.replaceChildren(fragment); See https://web.dev/declarative-shadow-dom/#parser-only and https://web.dev/declarative-shadow-dom/#serialization for more details. |
Beta Was this translation helpful? Give feedback.
-
Hey @mmun,
Assuming we use shadow host as a CSS selector, in this case, it would be
|
Beta Was this translation helpful? Give feedback.
-
@mmun @c69-addepar please give |
Beta Was this translation helpful? Give feedback.
-
Hi @itsjwala , after trying
|
Beta Was this translation helpful? Give feedback.
-
Hi @itsjwala, i have tried the recent alpha today
Same error as before.
|
Beta Was this translation helpful? Give feedback.
-
Hi Team, @itsjwala ,
since
1.19.0-alpha.0
,@percy/cli
now supports Shadow DOM.Unfortunately, the changes in that repo alone are not enough to enable support for Ember apps. See percy/cli#1165 (comment)
Happy to provide more details if needed.
CC: @mmun @aschenoni
Beta Was this translation helpful? Give feedback.
All reactions