Skip to content

Commit

Permalink
Allow plugins to access current tab
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed May 10, 2020
1 parent 8729e8e commit 864f3d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/globalPlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class GlobalPlug implements Plug {
evaluator: sdk.evaluator,
user: sdk.user,
session: sdk.session,
tab: sdk.context.getTab(),
getLogger: (...namespace: string[]): Logger => {
return sdk.getLogger(PLUGIN_NAMESPACE, pluginName, ...namespace);
},
Expand Down
2 changes: 2 additions & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import {
UserFacade,
SessionFacade,
Logger,
Tab,
} from '@croct-tech/sdk';

export interface PluginSdk {
readonly tracker: Tracker;
readonly evaluator: Evaluator;
readonly user: UserFacade;
readonly session: SessionFacade;
readonly tab: Tab;

getLogger(...namespace: string[]): Logger;

Expand Down

0 comments on commit 864f3d0

Please sign in to comment.