You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a sandboxed extension with a defined dynamic menu, the dynamic menu should work as expected.
Actual Behavior
All the blocks in the block panel stack together at the top of the panel (which isn't important, as it is caused by the following problem), and the console throws the error Uncaught TypeError: e[t] is undefined. The problem came from the function _getExtensionMenuItems. It takes as argument argumentObject, and menuItemFunctionName. It tries to access the function with extensionObject[menuItemFunctionName], but when the extension is sandboxed, this does not exist. The function name is correct. Loading the extension in unsandboxed mode works.
Steps to Reproduce
Load the following extension :
classExtension{getInfo(){return{id: "extension",name: "Extension",blocks: [{opcode: "block",blocktype: "command",text: "A block with an argument : [ARG]",arguments: {ARG: {type: "string",menu: "extensionMenu"}}}],menus: {extensionMenu: {items: "extensionMenuFunction"}}}}block(){console.log("Hello world!")}extensionMenuFunction(){return["Hello","world","!"]}}Scratch.extensions.register(newExtension())
Operating System and Browser
Firefox 131.0.3 (64-bit) - Windows 11 24H2
The text was updated successfully, but these errors were encountered:
Expected Behavior
When loading a sandboxed extension with a defined dynamic menu, the dynamic menu should work as expected.
Actual Behavior
All the blocks in the block panel stack together at the top of the panel (which isn't important, as it is caused by the following problem), and the console throws the error
Uncaught TypeError: e[t] is undefined
. The problem came from the function_getExtensionMenuItems
. It takes as argumentargumentObject
, andmenuItemFunctionName
. It tries to access the function withextensionObject[menuItemFunctionName]
, but when the extension is sandboxed, this does not exist. The function name is correct. Loading the extension in unsandboxed mode works.Steps to Reproduce
Load the following extension :
Operating System and Browser
Firefox 131.0.3 (64-bit) - Windows 11 24H2
The text was updated successfully, but these errors were encountered: