mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(page): page.createIsolatedWorld error catching has been added (#7848)
Co-authored-by: DimaShustal <dzmitry.shustal@gmail.com> Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
parent
608d944012
commit
309e8b80da
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { EventEmitter } from './EventEmitter.js';
|
import { EventEmitter } from './EventEmitter.js';
|
||||||
import { assert } from './assert.js';
|
import { assert } from './assert.js';
|
||||||
import { helper } from './helper.js';
|
import { helper, debugError } from './helper.js';
|
||||||
import { ExecutionContext, EVALUATION_SCRIPT_URL } from './ExecutionContext.js';
|
import { ExecutionContext, EVALUATION_SCRIPT_URL } from './ExecutionContext.js';
|
||||||
import {
|
import {
|
||||||
LifecycleWatcher,
|
LifecycleWatcher,
|
||||||
@ -393,11 +393,13 @@ export class FrameManager extends EventEmitter {
|
|||||||
this.frames()
|
this.frames()
|
||||||
.filter((frame) => frame._client === session)
|
.filter((frame) => frame._client === session)
|
||||||
.map((frame) =>
|
.map((frame) =>
|
||||||
session.send('Page.createIsolatedWorld', {
|
session
|
||||||
frameId: frame._id,
|
.send('Page.createIsolatedWorld', {
|
||||||
worldName: name,
|
frameId: frame._id,
|
||||||
grantUniveralAccess: true,
|
worldName: name,
|
||||||
})
|
grantUniveralAccess: true,
|
||||||
|
})
|
||||||
|
.catch(debugError)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user