Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion extensions/src/common/extension/ExtensionBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ export abstract class ConstructableExtension {

protected async internal_init() {
const runtime = this.runtime;
const id = this.id;

return await Promise.resolve(this.init({
runtime,
get extensionManager() { return runtime.getExtensionManager() }
get extensionManager() { return runtime.getExtensionManager() },
scrollIntoView() { runtime.emitScrollUpdate(id) }
}));
}

Expand Down
1 change: 1 addition & 0 deletions extensions/src/common/types/framework/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type Environment = {
*/
runtime: Runtime,
extensionManager: ExtensionManager,
scrollIntoView: () => void,
}

export type Opocde<TExtension extends ExtensionInstance> = TExtension extends Extension<any, any>
Expand Down
2 changes: 1 addition & 1 deletion scratch-packages/scratch-gui
2 changes: 1 addition & 1 deletion scratch-packages/scratch-vm
Loading