diff --git a/packages/runtime/container-runtime/src/containerRuntime.ts b/packages/runtime/container-runtime/src/containerRuntime.ts index d70dbdd0826..ea78a14705e 100644 --- a/packages/runtime/container-runtime/src/containerRuntime.ts +++ b/packages/runtime/container-runtime/src/containerRuntime.ts @@ -483,6 +483,10 @@ export class ContainerRuntime extends EventEmitter implements IHostRuntime, IRun return this._flushMode; } + public get scope(): IComponent { + return this.context.scope; + } + public get IComponentRegistry(): IComponentRegistry { return this.registry; } diff --git a/packages/runtime/runtime-definitions/src/components.ts b/packages/runtime/runtime-definitions/src/components.ts index 51431065811..02e514bd486 100644 --- a/packages/runtime/runtime-definitions/src/components.ts +++ b/packages/runtime/runtime-definitions/src/components.ts @@ -332,6 +332,7 @@ export interface IHostRuntime extends readonly submitSignalFn: (contents: any) => void; readonly snapshotFn: (message: string) => Promise; readonly closeFn: () => void; + readonly scope: IComponent; /** * Returns the runtime of the component.