chrome-devtools-frontend 1.0.937775 → 1.0.938150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/all_devtools_files.gni +0 -4
- package/config/gni/devtools_grd_files.gni +2 -3
- package/front_end/Tests.js +0 -1
- package/front_end/core/sdk/DOMModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -0
- package/front_end/entrypoints/devtools_app/devtools_app.json +0 -1
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -3
- package/front_end/entrypoints/node_app/node_app.js +3 -0
- package/front_end/entrypoints/shell/shell.json +1 -3
- package/front_end/entrypoints/worker_app/worker_app.json +0 -1
- package/front_end/generated/InspectorBackendCommands.js +14 -5
- package/front_end/generated/SupportedCSSProperties.js +8 -4
- package/front_end/generated/protocol-mapping.d.ts +10 -0
- package/front_end/generated/protocol-proxy-api.d.ts +19 -0
- package/front_end/generated/protocol.d.ts +56 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +67 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/descriptions/deprecation.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/panels/application/module.json +1 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +0 -2
- package/front_end/panels/browser_debugger/module.json +1 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +18 -17
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +31 -10
- package/front_end/panels/elements/elements-meta.ts +0 -2
- package/front_end/panels/elements/stylesSidebarPane.css +8 -0
- package/front_end/panels/issues/issuesTree.css +11 -0
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +0 -2
- package/front_end/panels/sources/sources-meta.ts +0 -2
- package/front_end/third_party/puppeteer/package/CHANGELOG.md +29 -0
- package/front_end/third_party/puppeteer/package/README.md +12 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +13 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +25 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +6 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +16 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +8 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +21 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +155 -72
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +32 -29
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +14 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +13 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +2 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +33 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +92 -46
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +14 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +11 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +30 -15
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node-puppeteer-core.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node-puppeteer-core.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +22 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +6 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +21 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +150 -68
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +22 -19
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +15 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +33 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +69 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.js +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +7 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +27 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +3862 -3771
- package/front_end/third_party/puppeteer/package/package.json +33 -40
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/legacy/XLink.ts +3 -6
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +1 -1
- package/front_end/ui/legacy/inspectorSyntaxHighlightDark.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +5 -0
- package/front_end/ui/legacy/treeoutline.css +16 -0
- package/front_end/ui/legacy/viewContainers.css +6 -1
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/check_test_definitions.js +2 -1
- package/scripts/eslint_rules/tests/check_test_definitions_test.js +34 -0
- package/scripts/eslint_rules/tests/migrate_create_shadow_root_with_styles_test.js +1 -1
- package/scripts/eslint_rules/tests/migrate_register_required_css_test.js +1 -1
- package/front_end/panels/elements/module.json +0 -5
- package/front_end/panels/protocol_monitor/module.json +0 -5
- package/front_end/panels/sources/module.json +0 -5
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js
CHANGED
|
@@ -175,7 +175,7 @@ class ExecutionContext {
|
|
|
175
175
|
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
|
|
176
176
|
return returnByValue
|
|
177
177
|
? helper_js_1.helper.valueFromRemoteObject(remoteObject)
|
|
178
|
-
: JSHandle_js_1.createJSHandle(this, remoteObject);
|
|
178
|
+
: (0, JSHandle_js_1.createJSHandle)(this, remoteObject);
|
|
179
179
|
}
|
|
180
180
|
if (typeof pageFunction !== 'function')
|
|
181
181
|
throw new Error(`Expected to get |string| or |function| as the first argument, but got "${pageFunction}" instead.`);
|
|
@@ -221,7 +221,7 @@ class ExecutionContext {
|
|
|
221
221
|
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
|
|
222
222
|
return returnByValue
|
|
223
223
|
? helper_js_1.helper.valueFromRemoteObject(remoteObject)
|
|
224
|
-
: JSHandle_js_1.createJSHandle(this, remoteObject);
|
|
224
|
+
: (0, JSHandle_js_1.createJSHandle)(this, remoteObject);
|
|
225
225
|
/**
|
|
226
226
|
* @param {*} arg
|
|
227
227
|
* @returns {*}
|
|
@@ -289,12 +289,12 @@ class ExecutionContext {
|
|
|
289
289
|
* @returns A handle to an array of objects with the given prototype.
|
|
290
290
|
*/
|
|
291
291
|
async queryObjects(prototypeHandle) {
|
|
292
|
-
assert_js_1.assert(!prototypeHandle._disposed, 'Prototype JSHandle is disposed!');
|
|
293
|
-
assert_js_1.assert(prototypeHandle._remoteObject.objectId, 'Prototype JSHandle must not be referencing primitive value');
|
|
292
|
+
(0, assert_js_1.assert)(!prototypeHandle._disposed, 'Prototype JSHandle is disposed!');
|
|
293
|
+
(0, assert_js_1.assert)(prototypeHandle._remoteObject.objectId, 'Prototype JSHandle must not be referencing primitive value');
|
|
294
294
|
const response = await this._client.send('Runtime.queryObjects', {
|
|
295
295
|
prototypeObjectId: prototypeHandle._remoteObject.objectId,
|
|
296
296
|
});
|
|
297
|
-
return JSHandle_js_1.createJSHandle(this, response.objects);
|
|
297
|
+
return (0, JSHandle_js_1.createJSHandle)(this, response.objects);
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
300
|
* @internal
|
|
@@ -304,14 +304,14 @@ class ExecutionContext {
|
|
|
304
304
|
backendNodeId: backendNodeId,
|
|
305
305
|
executionContextId: this._contextId,
|
|
306
306
|
});
|
|
307
|
-
return JSHandle_js_1.createJSHandle(this, object);
|
|
307
|
+
return (0, JSHandle_js_1.createJSHandle)(this, object);
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
310
|
* @internal
|
|
311
311
|
*/
|
|
312
312
|
async _adoptElementHandle(elementHandle) {
|
|
313
|
-
assert_js_1.assert(elementHandle.executionContext() !== this, 'Cannot adopt handle that already belongs to this execution context');
|
|
314
|
-
assert_js_1.assert(this._world, 'Cannot adopt handle without DOMWorld');
|
|
313
|
+
(0, assert_js_1.assert)(elementHandle.executionContext() !== this, 'Cannot adopt handle that already belongs to this execution context');
|
|
314
|
+
(0, assert_js_1.assert)(this._world, 'Cannot adopt handle without DOMWorld');
|
|
315
315
|
const nodeInfo = await this._client.send('DOM.describeNode', {
|
|
316
316
|
objectId: elementHandle._remoteObject.objectId,
|
|
317
317
|
});
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionContext.js","sourceRoot":"","sources":["../../../../src/common/ExecutionContext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAqC;AACrC,2CAAqC;AACrC,+CAAwE;AAMxE;;GAEG;AACU,QAAA,qBAAqB,GAAG,iCAAiC,CAAC;AACvE,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAEvE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,gBAAgB;IAkB3B;;OAEG;IACH,YACE,MAAkB,EAClB,cAA4D,EAC5D,KAAe;QAEf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,EAAE,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,KAA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H,KAAK,CAAC,mBAAmB,CACvB,aAAyC;QAEzC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC5D,aAAa,EAAE,aAAa;YAC5B,kBAAkB,EAAE,IAAI,CAAC,UAAU;SACpC,CAAC,CAAC;QACH,OAAO,IAAA,4BAAc,EAAC,IAAI,EAAE,MAAM,CAAkB,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CACvB,aAA4B;QAE5B,IAAA,kBAAM,EACJ,aAAa,CAAC,gBAAgB,EAAE,KAAK,IAAI,EACzC,oEAAoE,CACrE,CAAC;QACF,IAAA,kBAAM,EAAC,IAAI,CAAC,MAAM,EAAE,sCAAsC,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3D,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,QAAQ;SAC/C,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/D,CAAC;CACF;AAxVD,4CAwVC"}
|
|
@@ -56,7 +56,7 @@ class FileChooser {
|
|
|
56
56
|
* then they are resolved relative to the {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}.
|
|
57
57
|
*/
|
|
58
58
|
async accept(filePaths) {
|
|
59
|
-
assert_js_1.assert(!this._handled, 'Cannot accept FileChooser which is already handled!');
|
|
59
|
+
(0, assert_js_1.assert)(!this._handled, 'Cannot accept FileChooser which is already handled!');
|
|
60
60
|
this._handled = true;
|
|
61
61
|
await this._element.uploadFile(...filePaths);
|
|
62
62
|
}
|
|
@@ -64,7 +64,7 @@ class FileChooser {
|
|
|
64
64
|
* Closes the file chooser without selecting any files.
|
|
65
65
|
*/
|
|
66
66
|
cancel() {
|
|
67
|
-
assert_js_1.assert(!this._handled, 'Cannot cancel FileChooser which is already handled!');
|
|
67
|
+
(0, assert_js_1.assert)(!this._handled, 'Cannot cancel FileChooser which is already handled!');
|
|
68
68
|
this._handled = true;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileChooser.js","sourceRoot":"","sources":["../../../../src/common/FileChooser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,2CAAqC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,WAAW;IAKtB;;OAEG;IACH,YACE,OAAsB,EACtB,KAA2C;QAPrC,aAAQ,GAAG,KAAK,CAAC;QASvB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,SAAmB;QAC9B,kBAAM,
|
|
1
|
+
{"version":3,"file":"FileChooser.js","sourceRoot":"","sources":["../../../../src/common/FileChooser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,2CAAqC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,WAAW;IAKtB;;OAEG;IACH,YACE,OAAsB,EACtB,KAA2C;QAPrC,aAAQ,GAAG,KAAK,CAAC;QASvB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,SAAmB;QAC9B,IAAA,kBAAM,EACJ,CAAC,IAAI,CAAC,QAAQ,EACd,qDAAqD,CACtD,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,IAAA,kBAAM,EACJ,CAAC,IAAI,CAAC,QAAQ,EACd,qDAAqD,CACtD,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF;AA/CD,kCA+CC"}
|
|
@@ -55,8 +55,10 @@ export declare class FrameManager extends EventEmitter {
|
|
|
55
55
|
private _contextIdToContext;
|
|
56
56
|
private _isolatedWorlds;
|
|
57
57
|
private _mainFrame;
|
|
58
|
+
private _disconnectPromise?;
|
|
58
59
|
constructor(client: CDPSession, page: Page, ignoreHTTPSErrors: boolean, timeoutSettings: TimeoutSettings);
|
|
59
|
-
|
|
60
|
+
private setupEventListeners;
|
|
61
|
+
initialize(client?: CDPSession): Promise<void>;
|
|
60
62
|
networkManager(): NetworkManager;
|
|
61
63
|
navigateFrame(frame: Frame, url: string, options?: {
|
|
62
64
|
referer?: string;
|
|
@@ -67,23 +69,24 @@ export declare class FrameManager extends EventEmitter {
|
|
|
67
69
|
timeout?: number;
|
|
68
70
|
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
69
71
|
}): Promise<HTTPResponse | null>;
|
|
70
|
-
private
|
|
72
|
+
private _onAttachedToTarget;
|
|
73
|
+
private _onDetachedFromTarget;
|
|
71
74
|
_onLifecycleEvent(event: Protocol.Page.LifecycleEventEvent): void;
|
|
72
75
|
_onFrameStoppedLoading(frameId: string): void;
|
|
73
|
-
_handleFrameTree(frameTree: Protocol.Page.FrameTree): void;
|
|
76
|
+
_handleFrameTree(session: CDPSession, frameTree: Protocol.Page.FrameTree): void;
|
|
74
77
|
page(): Page;
|
|
75
78
|
mainFrame(): Frame;
|
|
76
79
|
frames(): Frame[];
|
|
77
80
|
frame(frameId: string): Frame | null;
|
|
78
|
-
_onFrameAttached(frameId: string, parentFrameId?: string): void;
|
|
81
|
+
_onFrameAttached(session: CDPSession, frameId: string, parentFrameId?: string): void;
|
|
79
82
|
_onFrameNavigated(framePayload: Protocol.Page.Frame): void;
|
|
80
|
-
_ensureIsolatedWorld(name: string): Promise<void>;
|
|
83
|
+
_ensureIsolatedWorld(session: CDPSession, name: string): Promise<void>;
|
|
81
84
|
_onFrameNavigatedWithinDocument(frameId: string, url: string): void;
|
|
82
|
-
_onFrameDetached(frameId: string): void;
|
|
83
|
-
_onExecutionContextCreated(contextPayload: Protocol.Runtime.ExecutionContextDescription): void;
|
|
85
|
+
_onFrameDetached(frameId: string, reason: Protocol.Page.FrameDetachedEventReason): void;
|
|
86
|
+
_onExecutionContextCreated(contextPayload: Protocol.Runtime.ExecutionContextDescription, session: CDPSession): void;
|
|
84
87
|
private _onExecutionContextDestroyed;
|
|
85
88
|
private _onExecutionContextsCleared;
|
|
86
|
-
executionContextById(contextId: number): ExecutionContext;
|
|
89
|
+
executionContextById(contextId: number, session?: CDPSession): ExecutionContext;
|
|
87
90
|
private _removeFramesRecursively;
|
|
88
91
|
}
|
|
89
92
|
/**
|
|
@@ -242,7 +245,16 @@ export declare class Frame {
|
|
|
242
245
|
/**
|
|
243
246
|
* @internal
|
|
244
247
|
*/
|
|
245
|
-
|
|
248
|
+
_client: CDPSession;
|
|
249
|
+
/**
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
constructor(frameManager: FrameManager, parentFrame: Frame | null, frameId: string, client: CDPSession);
|
|
253
|
+
/**
|
|
254
|
+
* @internal
|
|
255
|
+
*/
|
|
256
|
+
_updateClient(client: CDPSession): void;
|
|
257
|
+
isOOPFrame(): boolean;
|
|
246
258
|
/**
|
|
247
259
|
* @remarks
|
|
248
260
|
*
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameManager.d.ts","sourceRoot":"","sources":["../../../../src/common/FrameManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"FrameManager.d.ts","sourceRoot":"","sources":["../../../../src/common/FrameManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAEL,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAc,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAKxB;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;CAUrC,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,KAAK,CAAO;IACpB,OAAO,CAAC,eAAe,CAAiB;IACxC,gBAAgB,EAAE,eAAe,CAAC;IAClC,OAAO,CAAC,OA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;;;;;;OAkCG;IACH,eAAe,CACb,YAAY,EAAE,QAAQ,GAAG,MAAM,EAC/B,OAAO,GAAE,2BAAgC,EACzC,GAAG,IAAI,EAAE,sBAAsB,EAAE,GAChC,OAAO,CAAC,QAAQ,CAAC;IAIpB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9B;;OAEG;IACH,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI;IAKnD;;OAEG;IACH,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI3C;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAQvD;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAKzB;;OAEG;IACH,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Frame = exports.FrameManager = exports.FrameManagerEmittedEvents = void 0;
|
|
19
|
-
const Debug_js_1 = require("../common/Debug.js");
|
|
20
19
|
const EventEmitter_js_1 = require("./EventEmitter.js");
|
|
21
20
|
const assert_js_1 = require("./assert.js");
|
|
22
21
|
const helper_js_1 = require("./helper.js");
|
|
@@ -24,6 +23,7 @@ const ExecutionContext_js_1 = require("./ExecutionContext.js");
|
|
|
24
23
|
const LifecycleWatcher_js_1 = require("./LifecycleWatcher.js");
|
|
25
24
|
const DOMWorld_js_1 = require("./DOMWorld.js");
|
|
26
25
|
const NetworkManager_js_1 = require("./NetworkManager.js");
|
|
26
|
+
const Connection_js_1 = require("./Connection.js");
|
|
27
27
|
const UTILITY_WORLD_NAME = '__puppeteer_utility_world__';
|
|
28
28
|
const xPathPattern = /^\(\/\/[^\)]+\)|^\/\//;
|
|
29
29
|
/**
|
|
@@ -54,31 +54,70 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
54
54
|
this._page = page;
|
|
55
55
|
this._networkManager = new NetworkManager_js_1.NetworkManager(client, ignoreHTTPSErrors, this);
|
|
56
56
|
this._timeoutSettings = timeoutSettings;
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
57
|
+
this.setupEventListeners(this._client);
|
|
58
|
+
}
|
|
59
|
+
setupEventListeners(session) {
|
|
60
|
+
session.on('Page.frameAttached', (event) => {
|
|
61
|
+
this._onFrameAttached(session, event.frameId, event.parentFrameId);
|
|
62
|
+
});
|
|
63
|
+
session.on('Page.frameNavigated', (event) => {
|
|
64
|
+
this._onFrameNavigated(event.frame);
|
|
65
|
+
});
|
|
66
|
+
session.on('Page.navigatedWithinDocument', (event) => {
|
|
67
|
+
this._onFrameNavigatedWithinDocument(event.frameId, event.url);
|
|
68
|
+
});
|
|
69
|
+
session.on('Page.frameDetached', (event) => {
|
|
70
|
+
this._onFrameDetached(event.frameId, event.reason);
|
|
71
|
+
});
|
|
72
|
+
session.on('Page.frameStoppedLoading', (event) => {
|
|
73
|
+
this._onFrameStoppedLoading(event.frameId);
|
|
74
|
+
});
|
|
75
|
+
session.on('Runtime.executionContextCreated', (event) => {
|
|
76
|
+
this._onExecutionContextCreated(event.context, session);
|
|
77
|
+
});
|
|
78
|
+
session.on('Runtime.executionContextDestroyed', (event) => {
|
|
79
|
+
this._onExecutionContextDestroyed(event.executionContextId, session);
|
|
80
|
+
});
|
|
81
|
+
session.on('Runtime.executionContextsCleared', () => {
|
|
82
|
+
this._onExecutionContextsCleared(session);
|
|
83
|
+
});
|
|
84
|
+
session.on('Page.lifecycleEvent', (event) => {
|
|
85
|
+
this._onLifecycleEvent(event);
|
|
86
|
+
});
|
|
87
|
+
session.on('Target.attachedToTarget', async (event) => {
|
|
88
|
+
this._onAttachedToTarget(event);
|
|
89
|
+
});
|
|
90
|
+
session.on('Target.detachedFromTarget', async (event) => {
|
|
91
|
+
this._onDetachedFromTarget(event);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async initialize(client = this._client) {
|
|
95
|
+
try {
|
|
96
|
+
const result = await Promise.all([
|
|
97
|
+
client.send('Page.enable'),
|
|
98
|
+
client.send('Page.getFrameTree'),
|
|
99
|
+
]);
|
|
100
|
+
const { frameTree } = result[1];
|
|
101
|
+
this._handleFrameTree(client, frameTree);
|
|
102
|
+
await Promise.all([
|
|
103
|
+
client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
|
|
104
|
+
client
|
|
105
|
+
.send('Runtime.enable')
|
|
106
|
+
.then(() => this._ensureIsolatedWorld(client, UTILITY_WORLD_NAME)),
|
|
107
|
+
// TODO: Network manager is not aware of OOP iframes yet.
|
|
108
|
+
client === this._client
|
|
109
|
+
? this._networkManager.initialize()
|
|
110
|
+
: Promise.resolve(),
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
// The target might have been closed before the initialization finished.
|
|
115
|
+
if (error.message.includes('Target closed') ||
|
|
116
|
+
error.message.includes('Session closed')) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
82
121
|
}
|
|
83
122
|
networkManager() {
|
|
84
123
|
return this._networkManager;
|
|
@@ -135,15 +174,23 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
135
174
|
throw error;
|
|
136
175
|
return watcher.navigationResponse();
|
|
137
176
|
}
|
|
138
|
-
async
|
|
177
|
+
async _onAttachedToTarget(event) {
|
|
139
178
|
if (event.targetInfo.type !== 'iframe') {
|
|
140
179
|
return;
|
|
141
180
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
181
|
+
const frame = this._frames.get(event.targetInfo.targetId);
|
|
182
|
+
const session = Connection_js_1.Connection.fromSession(this._client).session(event.sessionId);
|
|
183
|
+
frame._updateClient(session);
|
|
184
|
+
this.setupEventListeners(session);
|
|
185
|
+
await this.initialize(session);
|
|
186
|
+
}
|
|
187
|
+
async _onDetachedFromTarget(event) {
|
|
188
|
+
const frame = this._frames.get(event.targetId);
|
|
189
|
+
if (frame && frame.isOOPFrame()) {
|
|
190
|
+
// When an OOP iframe is removed from the page, it
|
|
191
|
+
// will only get a Target.detachedFromTarget event.
|
|
192
|
+
this._removeFramesRecursively(frame);
|
|
193
|
+
}
|
|
147
194
|
}
|
|
148
195
|
_onLifecycleEvent(event) {
|
|
149
196
|
const frame = this._frames.get(event.frameId);
|
|
@@ -159,14 +206,16 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
159
206
|
frame._onLoadingStopped();
|
|
160
207
|
this.emit(exports.FrameManagerEmittedEvents.LifecycleEvent, frame);
|
|
161
208
|
}
|
|
162
|
-
_handleFrameTree(frameTree) {
|
|
163
|
-
if (frameTree.frame.parentId)
|
|
164
|
-
this._onFrameAttached(frameTree.frame.id, frameTree.frame.parentId);
|
|
209
|
+
_handleFrameTree(session, frameTree) {
|
|
210
|
+
if (frameTree.frame.parentId) {
|
|
211
|
+
this._onFrameAttached(session, frameTree.frame.id, frameTree.frame.parentId);
|
|
212
|
+
}
|
|
165
213
|
this._onFrameNavigated(frameTree.frame);
|
|
166
214
|
if (!frameTree.childFrames)
|
|
167
215
|
return;
|
|
168
|
-
for (const child of frameTree.childFrames)
|
|
169
|
-
this._handleFrameTree(child);
|
|
216
|
+
for (const child of frameTree.childFrames) {
|
|
217
|
+
this._handleFrameTree(session, child);
|
|
218
|
+
}
|
|
170
219
|
}
|
|
171
220
|
page() {
|
|
172
221
|
return this._page;
|
|
@@ -180,12 +229,20 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
180
229
|
frame(frameId) {
|
|
181
230
|
return this._frames.get(frameId) || null;
|
|
182
231
|
}
|
|
183
|
-
_onFrameAttached(frameId, parentFrameId) {
|
|
184
|
-
if (this._frames.has(frameId))
|
|
232
|
+
_onFrameAttached(session, frameId, parentFrameId) {
|
|
233
|
+
if (this._frames.has(frameId)) {
|
|
234
|
+
const frame = this._frames.get(frameId);
|
|
235
|
+
if (session && frame.isOOPFrame()) {
|
|
236
|
+
// If an OOP iframes becomes a normal iframe again
|
|
237
|
+
// it is first attached to the parent page before
|
|
238
|
+
// the target is removed.
|
|
239
|
+
frame._updateClient(session);
|
|
240
|
+
}
|
|
185
241
|
return;
|
|
186
|
-
|
|
242
|
+
}
|
|
243
|
+
(0, assert_js_1.assert)(parentFrameId);
|
|
187
244
|
const parentFrame = this._frames.get(parentFrameId);
|
|
188
|
-
const frame = new Frame(this, parentFrame, frameId);
|
|
245
|
+
const frame = new Frame(this, parentFrame, frameId, session);
|
|
189
246
|
this._frames.set(frame._id, frame);
|
|
190
247
|
this.emit(exports.FrameManagerEmittedEvents.FrameAttached, frame);
|
|
191
248
|
}
|
|
@@ -194,7 +251,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
194
251
|
let frame = isMainFrame
|
|
195
252
|
? this._mainFrame
|
|
196
253
|
: this._frames.get(framePayload.id);
|
|
197
|
-
assert_js_1.assert(isMainFrame || frame, 'We either navigate top level or have old version of the navigated frame');
|
|
254
|
+
(0, assert_js_1.assert)(isMainFrame || frame, 'We either navigate top level or have old version of the navigated frame');
|
|
198
255
|
// Detach all child frames first.
|
|
199
256
|
if (frame) {
|
|
200
257
|
for (const child of frame.childFrames())
|
|
@@ -209,7 +266,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
209
266
|
}
|
|
210
267
|
else {
|
|
211
268
|
// Initial main frame navigation.
|
|
212
|
-
frame = new Frame(this, null, framePayload.id);
|
|
269
|
+
frame = new Frame(this, null, framePayload.id, this._client);
|
|
213
270
|
}
|
|
214
271
|
this._frames.set(framePayload.id, frame);
|
|
215
272
|
this._mainFrame = frame;
|
|
@@ -218,22 +275,23 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
218
275
|
frame._navigated(framePayload);
|
|
219
276
|
this.emit(exports.FrameManagerEmittedEvents.FrameNavigated, frame);
|
|
220
277
|
}
|
|
221
|
-
async _ensureIsolatedWorld(name) {
|
|
222
|
-
|
|
278
|
+
async _ensureIsolatedWorld(session, name) {
|
|
279
|
+
const key = `${session.id()}:${name}`;
|
|
280
|
+
if (this._isolatedWorlds.has(key))
|
|
223
281
|
return;
|
|
224
|
-
this._isolatedWorlds.add(
|
|
225
|
-
await
|
|
282
|
+
this._isolatedWorlds.add(key);
|
|
283
|
+
await session.send('Page.addScriptToEvaluateOnNewDocument', {
|
|
226
284
|
source: `//# sourceURL=${ExecutionContext_js_1.EVALUATION_SCRIPT_URL}`,
|
|
227
285
|
worldName: name,
|
|
228
286
|
});
|
|
229
287
|
// Frames might be removed before we send this.
|
|
230
|
-
await Promise.all(this.frames()
|
|
231
|
-
.
|
|
288
|
+
await Promise.all(this.frames()
|
|
289
|
+
.filter((frame) => frame._client === session)
|
|
290
|
+
.map((frame) => session.send('Page.createIsolatedWorld', {
|
|
232
291
|
frameId: frame._id,
|
|
233
292
|
worldName: name,
|
|
234
293
|
grantUniveralAccess: true,
|
|
235
|
-
})
|
|
236
|
-
.catch(helper_js_1.debugError)));
|
|
294
|
+
})));
|
|
237
295
|
}
|
|
238
296
|
_onFrameNavigatedWithinDocument(frameId, url) {
|
|
239
297
|
const frame = this._frames.get(frameId);
|
|
@@ -243,17 +301,25 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
243
301
|
this.emit(exports.FrameManagerEmittedEvents.FrameNavigatedWithinDocument, frame);
|
|
244
302
|
this.emit(exports.FrameManagerEmittedEvents.FrameNavigated, frame);
|
|
245
303
|
}
|
|
246
|
-
_onFrameDetached(frameId) {
|
|
304
|
+
_onFrameDetached(frameId, reason) {
|
|
247
305
|
const frame = this._frames.get(frameId);
|
|
248
|
-
if (
|
|
249
|
-
|
|
306
|
+
if (reason === 'remove') {
|
|
307
|
+
// Only remove the frame if the reason for the detached event is
|
|
308
|
+
// an actual removement of the frame.
|
|
309
|
+
// For frames that become OOP iframes, the reason would be 'swap'.
|
|
310
|
+
if (frame)
|
|
311
|
+
this._removeFramesRecursively(frame);
|
|
312
|
+
}
|
|
250
313
|
}
|
|
251
|
-
_onExecutionContextCreated(contextPayload) {
|
|
314
|
+
_onExecutionContextCreated(contextPayload, session) {
|
|
252
315
|
const auxData = contextPayload.auxData;
|
|
253
316
|
const frameId = auxData ? auxData.frameId : null;
|
|
254
317
|
const frame = this._frames.get(frameId) || null;
|
|
255
318
|
let world = null;
|
|
256
319
|
if (frame) {
|
|
320
|
+
// Only care about execution contexts created for the current session.
|
|
321
|
+
if (frame._client !== session)
|
|
322
|
+
return;
|
|
257
323
|
if (contextPayload.auxData && !!contextPayload.auxData['isDefault']) {
|
|
258
324
|
world = frame._mainWorld;
|
|
259
325
|
}
|
|
@@ -265,29 +331,36 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
265
331
|
world = frame._secondaryWorld;
|
|
266
332
|
}
|
|
267
333
|
}
|
|
268
|
-
const context = new ExecutionContext_js_1.ExecutionContext(this._client, contextPayload, world);
|
|
334
|
+
const context = new ExecutionContext_js_1.ExecutionContext(frame._client || this._client, contextPayload, world);
|
|
269
335
|
if (world)
|
|
270
336
|
world._setContext(context);
|
|
271
|
-
|
|
337
|
+
const key = `${session.id()}:${contextPayload.id}`;
|
|
338
|
+
this._contextIdToContext.set(key, context);
|
|
272
339
|
}
|
|
273
|
-
_onExecutionContextDestroyed(executionContextId) {
|
|
274
|
-
const
|
|
340
|
+
_onExecutionContextDestroyed(executionContextId, session) {
|
|
341
|
+
const key = `${session.id()}:${executionContextId}`;
|
|
342
|
+
const context = this._contextIdToContext.get(key);
|
|
275
343
|
if (!context)
|
|
276
344
|
return;
|
|
277
|
-
this._contextIdToContext.delete(
|
|
345
|
+
this._contextIdToContext.delete(key);
|
|
278
346
|
if (context._world)
|
|
279
347
|
context._world._setContext(null);
|
|
280
348
|
}
|
|
281
|
-
_onExecutionContextsCleared() {
|
|
282
|
-
for (const context of this._contextIdToContext.
|
|
349
|
+
_onExecutionContextsCleared(session) {
|
|
350
|
+
for (const [key, context] of this._contextIdToContext.entries()) {
|
|
351
|
+
// Make sure to only clear execution contexts that belong
|
|
352
|
+
// to the current session.
|
|
353
|
+
if (context._client !== session)
|
|
354
|
+
continue;
|
|
283
355
|
if (context._world)
|
|
284
356
|
context._world._setContext(null);
|
|
357
|
+
this._contextIdToContext.delete(key);
|
|
285
358
|
}
|
|
286
|
-
this._contextIdToContext.clear();
|
|
287
359
|
}
|
|
288
|
-
executionContextById(contextId) {
|
|
289
|
-
const
|
|
290
|
-
|
|
360
|
+
executionContextById(contextId, session = this._client) {
|
|
361
|
+
const key = `${session.id()}:${contextId}`;
|
|
362
|
+
const context = this._contextIdToContext.get(key);
|
|
363
|
+
(0, assert_js_1.assert)(context, 'INTERNAL ERROR: missing context with id = ' + contextId);
|
|
291
364
|
return context;
|
|
292
365
|
}
|
|
293
366
|
_removeFramesRecursively(frame) {
|
|
@@ -352,7 +425,7 @@ class Frame {
|
|
|
352
425
|
/**
|
|
353
426
|
* @internal
|
|
354
427
|
*/
|
|
355
|
-
constructor(frameManager, parentFrame, frameId) {
|
|
428
|
+
constructor(frameManager, parentFrame, frameId, client) {
|
|
356
429
|
this._url = '';
|
|
357
430
|
this._detached = false;
|
|
358
431
|
/**
|
|
@@ -369,11 +442,21 @@ class Frame {
|
|
|
369
442
|
this._id = frameId;
|
|
370
443
|
this._detached = false;
|
|
371
444
|
this._loaderId = '';
|
|
372
|
-
this._mainWorld = new DOMWorld_js_1.DOMWorld(frameManager, this, frameManager._timeoutSettings);
|
|
373
|
-
this._secondaryWorld = new DOMWorld_js_1.DOMWorld(frameManager, this, frameManager._timeoutSettings);
|
|
374
445
|
this._childFrames = new Set();
|
|
375
446
|
if (this._parentFrame)
|
|
376
447
|
this._parentFrame._childFrames.add(this);
|
|
448
|
+
this._updateClient(client);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* @internal
|
|
452
|
+
*/
|
|
453
|
+
_updateClient(client) {
|
|
454
|
+
this._client = client;
|
|
455
|
+
this._mainWorld = new DOMWorld_js_1.DOMWorld(this._client, this._frameManager, this, this._frameManager._timeoutSettings);
|
|
456
|
+
this._secondaryWorld = new DOMWorld_js_1.DOMWorld(this._client, this._frameManager, this, this._frameManager._timeoutSettings);
|
|
457
|
+
}
|
|
458
|
+
isOOPFrame() {
|
|
459
|
+
return this._client !== this._frameManager._client;
|
|
377
460
|
}
|
|
378
461
|
/**
|
|
379
462
|
* @remarks
|
|
@@ -958,8 +1041,8 @@ class Frame {
|
|
|
958
1041
|
}
|
|
959
1042
|
exports.Frame = Frame;
|
|
960
1043
|
function assertNoLegacyNavigationOptions(options) {
|
|
961
|
-
assert_js_1.assert(options['networkIdleTimeout'] === undefined, 'ERROR: networkIdleTimeout option is no longer supported.');
|
|
962
|
-
assert_js_1.assert(options['networkIdleInflight'] === undefined, 'ERROR: networkIdleInflight option is no longer supported.');
|
|
963
|
-
assert_js_1.assert(options.waitUntil !== 'networkidle', 'ERROR: "networkidle" option is no longer supported. Use "networkidle2" instead');
|
|
1044
|
+
(0, assert_js_1.assert)(options['networkIdleTimeout'] === undefined, 'ERROR: networkIdleTimeout option is no longer supported.');
|
|
1045
|
+
(0, assert_js_1.assert)(options['networkIdleInflight'] === undefined, 'ERROR: networkIdleInflight option is no longer supported.');
|
|
1046
|
+
(0, assert_js_1.assert)(options.waitUntil !== 'networkidle', 'ERROR: "networkidle" option is no longer supported. Use "networkidle2" instead');
|
|
964
1047
|
}
|
|
965
1048
|
//# sourceMappingURL=FrameManager.js.map
|