-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#8220: Inject sandbox into document root instead of body #8777
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8777 +/- ##
==========================================
+ Coverage 74.24% 74.25% +0.01%
==========================================
Files 1332 1332
Lines 40817 40866 +49
Branches 7634 7642 +8
==========================================
+ Hits 30306 30347 +41
- Misses 10511 10519 +8 ☔ View full report in Codecov by Sentry. |
Playwright test resultsDetails Open report ↗︎ Flaky testsedge › tests/pageEditor/saveMod.spec.ts › can save a standalone trigger mod Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
@fregante any thoughts on using documentElement vs. body for the sandbox parent? |
await waitForBody(); | ||
document.body.append(shadowWrap(iframe)); | ||
await waitForDocumentRoot(); | ||
document.documentElement.append(shadowWrap(iframe)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update "the body" comment. Add comment explaining where we're adding to the documentElement vs. the body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We do the same for the sidebar and other widgets
When the PR is merged, the first loom link found on this PR will be posted to |
What does this PR do?
Discussion/Demo
Future Work
MutationObserver
approach I used to confirm behavior in the repro video (see above) or add retries to more thoroughly ensure that the iframe is on the page before executing a brickChecklist
For more information on our expectations for the PR process, see the
code review principles doc