Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow custom replay root #1061

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/extensions/replay/sessionrecording-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export declare type recordOptions<T> = {
plugins?: RecordPlugin[]
mousemoveWait?: number
keepIframeSrcFn?: KeepIframeSrcFn
root?: HTMLElement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we document here why we're adding this config?
do all flutter users have to set it?

// errorHandler?: ErrorHandler
}

Expand Down
1 change: 1 addition & 0 deletions src/extensions/replay/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ export class SessionRecording {
collectFonts: false,
inlineStylesheet: true,
recordCrossOriginIframes: false,
root: window?.document.body,
}
// We switched from loading all of rrweb to just the record part, but
// keep backwards compatibility if someone hasn't upgraded PostHog
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export interface SessionRecordingOptions {
// our settings here only support a subset of those proposed for rrweb's network capture plugin
recordHeaders?: boolean
recordBody?: boolean
root?: HTMLElement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... or should comment on when and why go here?

}

export type SessionIdChangedCallback = (sessionId: string, windowId: string | null | undefined) => void
Expand Down
Loading