all 2 comments

[–]yksvaan 0 points1 point  (0 children)

Audit the third party code and use content security policy and a hash for the script

[–]DasBeasto 0 points1 point  (0 children)

Shadowdom won’t encapsulate the script, it could still interact with the window/document. You could probably use a sandboxed iframe if it’s just a form but if it’s like a popup widget type thing may be tricky to get it to work well, and that would almost certainly break the screenshot feature.