Skip to content

Commit

Permalink
TW: fix font manager events
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed May 10, 2024
1 parent 68277e6 commit 9ca4b4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/test-scratch-vm-extension-tw.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,7 @@ Scratch.gui.getBlocklyEagerly().then((ScratchBlocks) => {
ScratchBlocks.getMainWorkspace()?.blockDB_;
ScratchBlocks.Workspace;
});

Scratch.vm.runtime.fontManager.on('change', () => {

});
5 changes: 4 additions & 1 deletion types/scratch-vm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ declare namespace VM {
canReadClipboard(): Awaitable<boolean>;
canNotify(): Awaitable<boolean>;
}
interface FontManager {
interface FontManagerEvents {
change: [];
}
interface FontManager extends EventEmitter<FontManagerEvents> {
runtime: Runtime;
fonts: Array<{
system: boolean;
Expand Down

0 comments on commit 9ca4b4c

Please sign in to comment.