Skip to content

Commit

Permalink
feat: enable unsandboxed extensions in setupScratchAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhu committed Nov 29, 2024
1 parent ff7e073 commit 816df19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extension-support/extension-load-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const clearScratchAPI = id => {
}
if (global.Scratch && pending.size === 0) {
global.Scratch.extensions = {
unsandboxed: true,
register: extensionInstance => {
const info = extensionInstance.getInfo();
throw new Error(`ScratchAPI: ${info.id} call extensions.register too late`);
Expand Down Expand Up @@ -74,6 +75,7 @@ const setupScratchAPI = (vm, id) => {
Color,
translate,
extensions: {
unsandboxed: true,
register: registerExt
},
vm: openVM,
Expand Down

0 comments on commit 816df19

Please sign in to comment.