diff --git a/index.tsx b/index.tsx index 051679b..66ad662 100644 --- a/index.tsx +++ b/index.tsx @@ -14,6 +14,7 @@ export interface Props { exportPath: string; basename?: string; language?: string; + event?: { [key: string]: any }; arguments?: any; eventHandlers?: { [id: string]: (...args: Array) => Promise }; loaded?: (el: HTMLElement) => any; @@ -25,6 +26,7 @@ export function ReactSRMWrapper({ exportPath, basename, language, + event, arguments: renderArguments, eventHandlers, loaded, @@ -70,6 +72,7 @@ export function ReactSRMWrapper({ element: anchorEl.current, basename: basename, language: language, + event: event, navigate: (commands: any[], _options: any) => history.push(urljoin(commands)), sendEvent: (id: string, ...args: Array) => eventHandlers?.[id]?.(...args), ...renderArguments,