Skip to content

Commit fd30f82

Browse files
authored
feat: Expose onLoad and forceLoad (#1558)
1 parent 3e84a1d commit fd30f82

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

packages/browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export {
2828

2929
export { BrowserBackend, BrowserOptions } from './backend';
3030
export { BrowserClient } from './client';
31-
export { defaultIntegrations, init, lastEventId, showReportDialog } from './sdk';
31+
export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog } from './sdk';
3232
export { SDK_NAME, SDK_VERSION } from './version';
3333

3434
import { Integrations as CoreIntegrations } from '@sentry/core';

packages/browser/src/sdk.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,17 @@ export function showReportDialog(
115115
export function lastEventId(): string | undefined {
116116
return getCurrentHub().lastEventId();
117117
}
118+
119+
/**
120+
* This function is here to be API compatible with the loader
121+
*/
122+
export function forceLoad(): void {
123+
// Noop
124+
}
125+
126+
/**
127+
* This function is here to be API compatible with the loader
128+
*/
129+
export function onLoad(callback: () => void): void {
130+
callback();
131+
}

0 commit comments

Comments
 (0)