fix(agent-browser): enable preview page domain
This commit is contained in:
@@ -865,6 +865,11 @@ export class AgentBrowserModule {
|
||||
value: PreviewDataInjectionValue,
|
||||
sessionRef?: string,
|
||||
): Promise<void> {
|
||||
await record.view.webContents.debugger.sendCommand(
|
||||
'Page.enable',
|
||||
undefined,
|
||||
sessionRef,
|
||||
);
|
||||
const response = await record.view.webContents.debugger.sendCommand(
|
||||
'Page.addScriptToEvaluateOnNewDocument',
|
||||
{ source: previewDataInjectionScript(binding.session.origin, value) },
|
||||
|
||||
Reference in New Issue
Block a user