-
Notifications
You must be signed in to change notification settings - Fork 645
Add experimental offscreen execution environment #1082
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
Conversation
429c4c8 to
e819593
Compare
packages/snaps-controllers/src/services/offscreen/OffscreenPostMessageStream.ts
Show resolved
Hide resolved
packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.ts
Outdated
Show resolved
Hide resolved
packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.ts
Show resolved
Hide resolved
packages/snaps-controllers/src/services/offscreen/OffscreenExecutionService.ts
Show resolved
Hide resolved
e819593 to
7ab497e
Compare
packages/snaps-controllers/src/services/offscreen/OffscreenPostMessageStream.ts
Outdated
Show resolved
Hide resolved
4408775 to
e3c32bb
Compare
Codecov Report
@@ Coverage Diff @@
## main #1082 +/- ##
==========================================
+ Coverage 94.51% 95.06% +0.55%
==========================================
Files 130 129 -1
Lines 4299 4279 -20
Branches 729 718 -11
==========================================
+ Hits 4063 4068 +5
+ Misses 236 211 -25
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
packages/snaps-controllers/src/services/iframe/IframeExecutionService.test.ts
Show resolved
Hide resolved
packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.test.ts
Outdated
Show resolved
Hide resolved
| // TODO: Rather than injecting the frame URL here, we should come up with | ||
| // a better way to do this. The frame URL is needed to avoid hard coding | ||
| // it in the offscreen execution environment. | ||
| frameUrl: this.#frameUrl, |
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.
Should we create an issue to figure out if we can remove the need for this being passed?
packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.ts
Show resolved
Hide resolved
packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.ts
Outdated
Show resolved
Hide resolved
92eaabd to
9a0829a
Compare
c7cf8b1 to
02c14ae
Compare
This adds a new execution environment that runs snaps using Chrome's
offscreenAPI. It behaves similar to the iframe execution environment, but uses a proxy between the extension and the iframes, which runs in an offscreen document. This makes it compatible with MV3.Closes #1088.