chrome-devtools-frontend 1.0.1625079 → 1.0.1626437
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/front_end/core/common/VersionController.ts +9 -7
- package/front_end/core/common/common.ts +0 -4
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaGcaTranslation.ts +2 -2
- package/front_end/core/host/Platform.ts +0 -9
- package/front_end/core/host/UserMetrics.ts +0 -55
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +60 -63
- package/front_end/core/sdk/CSSProperty.ts +1 -5
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -32
- package/front_end/{panels/application → core/sdk}/DOMStorageModel.ts +12 -10
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +12 -8
- package/front_end/entrypoints/main/SimpleApp.ts +3 -4
- package/front_end/entrypoints/main/main-meta.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +21 -21
- package/front_end/generated/protocol.ts +4 -1
- package/front_end/models/ai_assistance/StorageItem.ts +16 -0
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +82 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +9 -37
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +26 -3
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +10 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -1
- package/front_end/models/issues_manager/CookieIssue.ts +0 -4
- package/front_end/models/issues_manager/RelatedIssue.ts +0 -14
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -4
- package/front_end/models/web_mcp/WebMCPModel.ts +11 -2
- package/front_end/models/workspace/IgnoreListManager.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +10 -5
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +6 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +26 -9
- package/front_end/panels/application/ApplicationPanelSidebar.ts +32 -42
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/DOMStorageItemsView.ts +18 -13
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ResourcesPanel.ts +1 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -2
- package/front_end/panels/application/StorageView.ts +1 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/WebMCPTreeElement.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +74 -16
- package/front_end/panels/application/application.ts +0 -2
- package/front_end/panels/application/webMCPView.css +13 -2
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +3 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -152
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/StandaloneStylesContainer.ts +3 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +0 -61
- package/front_end/panels/elements/StylePropertyTreeElement.ts +36 -23
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -4
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -7
- package/front_end/panels/elements/stylesSidebarPane.css +0 -8
- package/front_end/panels/emulation/AdvancedApp.ts +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +207 -377
- package/front_end/panels/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/profiler/HeapProfilerPanel.ts +1 -2
- package/front_end/panels/screencast/ScreencastApp.ts +3 -3
- package/front_end/panels/screencast/screencast-meta.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -4
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +5 -1
- package/front_end/panels/sources/SourcesNavigator.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +179 -145
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/timelineTreeView.css +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +18 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -0
- 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/ConnectOptions.d.ts +37 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +143 -55
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +18 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +37 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/package.json +6 -6
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +69 -27
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +27 -8
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +60 -18
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +3 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +37 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +19 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -7
- package/front_end/ui/components/tooltips/Tooltip.ts +3 -3
- package/front_end/{core/common → ui/legacy}/AppProvider.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +4 -3
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/UIUserMetrics.ts +70 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -8
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +0 -6
- package/front_end/ui/legacy/legacy.ts +6 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/Images/src/custom-typography.svg +0 -3
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +0 -798
- package/front_end/ui/legacy/components/inline_editor/FontEditorUnitConverter.ts +0 -250
- package/front_end/ui/legacy/components/inline_editor/FontEditorUtils.ts +0 -204
- package/front_end/ui/legacy/components/inline_editor/fontEditor.css +0 -185
- /package/front_end/{core/common → ui/legacy}/App.ts +0 -0
|
@@ -3049,7 +3049,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
3049
3049
|
*/
|
|
3050
3050
|
// If moved update release-please config
|
|
3051
3051
|
// x-release-please-start-version
|
|
3052
|
-
const packageVersion = '24.
|
|
3052
|
+
const packageVersion = '24.43.0';
|
|
3053
3053
|
// x-release-please-end
|
|
3054
3054
|
|
|
3055
3055
|
/**
|
|
@@ -6565,7 +6565,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
6565
6565
|
* Fills out the input identified by the locator using the provided value. The
|
|
6566
6566
|
* type of the input is determined at runtime and the appropriate fill-out
|
|
6567
6567
|
* method is chosen based on the type. `contenteditable`, select, textarea and
|
|
6568
|
-
* input elements are supported.
|
|
6568
|
+
* input elements are supported. For checkboxes, radio buttons and switches
|
|
6569
|
+
* specify a boolean value.
|
|
6569
6570
|
*/
|
|
6570
6571
|
fill(value, options) {
|
|
6571
6572
|
return firstValueFrom(_assertClassBrand(_Locator_brand, this, _fill).call(this, value, options));
|
|
@@ -6613,12 +6614,28 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
6613
6614
|
return 'typeable-input';
|
|
6614
6615
|
}
|
|
6615
6616
|
if (el instanceof HTMLInputElement) {
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6617
|
+
switch (el.type) {
|
|
6618
|
+
case 'checkbox':
|
|
6619
|
+
case 'radio':
|
|
6620
|
+
return 'checkable-input';
|
|
6621
|
+
case 'text':
|
|
6622
|
+
case 'url':
|
|
6623
|
+
case 'tel':
|
|
6624
|
+
case 'search':
|
|
6625
|
+
case 'password':
|
|
6626
|
+
case 'number':
|
|
6627
|
+
case 'email':
|
|
6628
|
+
return 'typeable-input';
|
|
6629
|
+
default:
|
|
6630
|
+
return 'other-input';
|
|
6620
6631
|
}
|
|
6621
6632
|
}
|
|
6633
|
+
switch (el.getAttribute('role')) {
|
|
6634
|
+
case 'checkbox':
|
|
6635
|
+
case 'radio':
|
|
6636
|
+
case 'switch':
|
|
6637
|
+
return 'checkable-input';
|
|
6638
|
+
}
|
|
6622
6639
|
if (el.isContentEditable) {
|
|
6623
6640
|
return 'contenteditable';
|
|
6624
6641
|
}
|
|
@@ -6628,14 +6645,15 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
6628
6645
|
return from(handle.focus()).pipe(mergeMap(() => {
|
|
6629
6646
|
return from(handle.evaluate((input, newValue) => {
|
|
6630
6647
|
const element = input;
|
|
6648
|
+
const valString = String(newValue);
|
|
6631
6649
|
const currentValue = element.isContentEditable ? element.innerText : element.value;
|
|
6632
|
-
if (currentValue ===
|
|
6650
|
+
if (currentValue === valString) {
|
|
6633
6651
|
return;
|
|
6634
6652
|
}
|
|
6635
6653
|
if (element.isContentEditable) {
|
|
6636
|
-
element.innerText =
|
|
6654
|
+
element.innerText = valString;
|
|
6637
6655
|
} else {
|
|
6638
|
-
element.value =
|
|
6656
|
+
element.value = valString;
|
|
6639
6657
|
}
|
|
6640
6658
|
element.dispatchEvent(new Event('input', {
|
|
6641
6659
|
bubbles: true
|
|
@@ -6646,24 +6664,43 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
6646
6664
|
}, value));
|
|
6647
6665
|
}));
|
|
6648
6666
|
};
|
|
6667
|
+
const toggleIfNeeded = () => {
|
|
6668
|
+
return from(handle.evaluate(toggleEl => {
|
|
6669
|
+
if (toggleEl.indeterminate || toggleEl.getAttribute('aria-checked') === 'mixed') {
|
|
6670
|
+
return 'mixed';
|
|
6671
|
+
}
|
|
6672
|
+
return toggleEl.checked || toggleEl.getAttribute('aria-checked') === 'true';
|
|
6673
|
+
})).pipe(mergeMap(currentState => {
|
|
6674
|
+
if (currentState === 'mixed' || currentState !== !!value) {
|
|
6675
|
+
return from(handle.click());
|
|
6676
|
+
}
|
|
6677
|
+
return of(undefined);
|
|
6678
|
+
}));
|
|
6679
|
+
};
|
|
6649
6680
|
switch (inputType) {
|
|
6681
|
+
case 'checkable-input':
|
|
6682
|
+
return toggleIfNeeded();
|
|
6650
6683
|
case 'select':
|
|
6651
6684
|
return from(handle.select(value).then(noop));
|
|
6652
6685
|
case 'contenteditable':
|
|
6653
6686
|
case 'typeable-input':
|
|
6654
|
-
if (value.length < typingThreshold) {
|
|
6687
|
+
if (typeof value === 'string' && value.length < typingThreshold) {
|
|
6655
6688
|
return from(handle.evaluate((input, newValue) => {
|
|
6656
6689
|
const element = input;
|
|
6690
|
+
const valString = String(newValue);
|
|
6657
6691
|
const currentValue = element.isContentEditable ? element.innerText : input.value;
|
|
6692
|
+
if (currentValue === valString) {
|
|
6693
|
+
return '';
|
|
6694
|
+
}
|
|
6658
6695
|
// Clear the input if the current value does not match the filled
|
|
6659
6696
|
// out value.
|
|
6660
|
-
if (
|
|
6697
|
+
if (!valString.startsWith(currentValue) || !currentValue) {
|
|
6661
6698
|
if (element.isContentEditable) {
|
|
6662
6699
|
element.innerText = '';
|
|
6663
6700
|
} else {
|
|
6664
6701
|
input.value = '';
|
|
6665
6702
|
}
|
|
6666
|
-
return
|
|
6703
|
+
return valString;
|
|
6667
6704
|
}
|
|
6668
6705
|
// If the value is partially filled out, only type the rest. Move
|
|
6669
6706
|
// cursor to the end of the common prefix.
|
|
@@ -6674,7 +6711,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
6674
6711
|
input.value = '';
|
|
6675
6712
|
input.value = currentValue;
|
|
6676
6713
|
}
|
|
6677
|
-
return
|
|
6714
|
+
return valString.substring(currentValue.length);
|
|
6678
6715
|
}, value)).pipe(mergeMap(textToType => {
|
|
6679
6716
|
if (!textToType) {
|
|
6680
6717
|
return of(undefined);
|
|
@@ -21480,7 +21517,6 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
21480
21517
|
* @internal
|
|
21481
21518
|
*/
|
|
21482
21519
|
async initialize() {
|
|
21483
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21484
21520
|
return await _classPrivateFieldGet(_client16, this).send('WebMCP.enable').catch(debugError);
|
|
21485
21521
|
}
|
|
21486
21522
|
/**
|
|
@@ -21506,13 +21542,10 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
21506
21542
|
* @internal
|
|
21507
21543
|
*/
|
|
21508
21544
|
updateClient(client) {
|
|
21509
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21510
21545
|
_classPrivateFieldGet(_client16, this).off('WebMCP.toolsAdded', _classPrivateFieldGet(_onToolsAdded, this));
|
|
21511
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21512
21546
|
_classPrivateFieldGet(_client16, this).off('WebMCP.toolsRemoved', _classPrivateFieldGet(_onToolsRemoved, this));
|
|
21513
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21514
21547
|
_classPrivateFieldGet(_client16, this).off('WebMCP.toolInvoked', _classPrivateFieldGet(_onToolInvoked, this));
|
|
21515
|
-
// @ts-expect-error
|
|
21548
|
+
// @ts-expect-error M148 has non-final status type, update expected in M149
|
|
21516
21549
|
_classPrivateFieldGet(_client16, this).off('WebMCP.toolResponded', _classPrivateFieldGet(_onToolResponded, this));
|
|
21517
21550
|
_classPrivateFieldSet(_client16, this, client);
|
|
21518
21551
|
_assertClassBrand(_WebMCP_brand, this, _bindListeners).call(this);
|
|
@@ -21525,13 +21558,10 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
21525
21558
|
* SPDX-License-Identifier: Apache-2.0
|
|
21526
21559
|
*/
|
|
21527
21560
|
function _bindListeners() {
|
|
21528
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21529
21561
|
_classPrivateFieldGet(_client16, this).on('WebMCP.toolsAdded', _classPrivateFieldGet(_onToolsAdded, this));
|
|
21530
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21531
21562
|
_classPrivateFieldGet(_client16, this).on('WebMCP.toolsRemoved', _classPrivateFieldGet(_onToolsRemoved, this));
|
|
21532
|
-
// @ts-expect-error WebMCP is not yet in the Protocol types.
|
|
21533
21563
|
_classPrivateFieldGet(_client16, this).on('WebMCP.toolInvoked', _classPrivateFieldGet(_onToolInvoked, this));
|
|
21534
|
-
// @ts-expect-error
|
|
21564
|
+
// @ts-expect-error M148 has non-final status type, update expected in M149
|
|
21535
21565
|
_classPrivateFieldGet(_client16, this).on('WebMCP.toolResponded', _classPrivateFieldGet(_onToolResponded, this));
|
|
21536
21566
|
}
|
|
21537
21567
|
var __addDisposableResource$1 = undefined && undefined.__addDisposableResource || function (env, value, async) {
|
|
@@ -21810,6 +21840,10 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
21810
21840
|
async openDevTools() {
|
|
21811
21841
|
const pageTargetId = this.target()._targetId;
|
|
21812
21842
|
const browser = this.browser();
|
|
21843
|
+
const devtoolsTargetId = await browser._hasDevToolsTarget(this.target()._targetId);
|
|
21844
|
+
if (devtoolsTargetId) {
|
|
21845
|
+
return await browser._getDevToolsTargetPage(devtoolsTargetId);
|
|
21846
|
+
}
|
|
21813
21847
|
const devtoolsPage = await browser._createDevToolsPage(pageTargetId);
|
|
21814
21848
|
return devtoolsPage;
|
|
21815
21849
|
}
|
|
@@ -24077,7 +24111,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24077
24111
|
var _discoveryFilter = /*#__PURE__*/new WeakMap();
|
|
24078
24112
|
var _targetsIdsForInit = /*#__PURE__*/new WeakMap();
|
|
24079
24113
|
var _initialAttachDone = /*#__PURE__*/new WeakMap();
|
|
24080
|
-
var
|
|
24114
|
+
var _blocklist = /*#__PURE__*/new WeakMap();
|
|
24115
|
+
var _allowlist = /*#__PURE__*/new WeakMap();
|
|
24081
24116
|
var _TargetManager_brand = /*#__PURE__*/new WeakSet();
|
|
24082
24117
|
var _silentDetach = /*#__PURE__*/new WeakMap();
|
|
24083
24118
|
var _getParentTarget = /*#__PURE__*/new WeakMap();
|
|
@@ -24090,7 +24125,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24090
24125
|
var _isUrlAllowed = /*#__PURE__*/new WeakMap();
|
|
24091
24126
|
var _maybeSetupNetworkConditions = /*#__PURE__*/new WeakMap();
|
|
24092
24127
|
class TargetManager extends EventEmitter {
|
|
24093
|
-
constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true,
|
|
24128
|
+
constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true, blocklist, allowlist) {
|
|
24094
24129
|
super();
|
|
24095
24130
|
_classPrivateMethodInitSpec(this, _TargetManager_brand);
|
|
24096
24131
|
_classPrivateFieldInitSpec(this, _connection4, void 0);
|
|
@@ -24137,7 +24172,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24137
24172
|
// done. It indicates whethere we are running the initial auto-attach step or
|
|
24138
24173
|
// if we are handling targets after that.
|
|
24139
24174
|
_classPrivateFieldInitSpec(this, _initialAttachDone, false);
|
|
24140
|
-
_classPrivateFieldInitSpec(this,
|
|
24175
|
+
_classPrivateFieldInitSpec(this, _blocklist, []);
|
|
24176
|
+
_classPrivateFieldInitSpec(this, _allowlist, []);
|
|
24141
24177
|
_classPrivateFieldInitSpec(this, _silentDetach, async (session, parentSession) => {
|
|
24142
24178
|
await session.send('Runtime.runIfWaitingForDebugger').catch(debugError);
|
|
24143
24179
|
// We don't use `session.detach()` because that dispatches all commands on
|
|
@@ -24298,47 +24334,75 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24298
24334
|
* Helper to validate URL against blocklist patterns
|
|
24299
24335
|
*/
|
|
24300
24336
|
_classPrivateFieldInitSpec(this, _isUrlAllowed, url => {
|
|
24301
|
-
if (
|
|
24337
|
+
if (_classPrivateFieldGet(_blocklist, this).length === 0 && _classPrivateFieldGet(_allowlist, this).length === 0) {
|
|
24302
24338
|
return true;
|
|
24303
24339
|
}
|
|
24304
24340
|
// Always allow internal or setup pages
|
|
24305
24341
|
if (!url || url === 'about:blank') {
|
|
24306
24342
|
return true;
|
|
24307
24343
|
}
|
|
24308
|
-
for (const
|
|
24309
|
-
|
|
24310
|
-
|
|
24311
|
-
|
|
24312
|
-
|
|
24344
|
+
for (const item of _classPrivateFieldGet(_blocklist, this)) {
|
|
24345
|
+
if (item.pattern.test(url)) {
|
|
24346
|
+
return false;
|
|
24347
|
+
}
|
|
24348
|
+
}
|
|
24349
|
+
if (_classPrivateFieldGet(_allowlist, this).length > 0) {
|
|
24350
|
+
for (const item of _classPrivateFieldGet(_allowlist, this)) {
|
|
24351
|
+
if (item.pattern.test(url)) {
|
|
24352
|
+
return true;
|
|
24313
24353
|
}
|
|
24314
|
-
} catch {
|
|
24315
|
-
debugError(`Invalid URL pattern: ${rule}`);
|
|
24316
24354
|
}
|
|
24355
|
+
return false;
|
|
24317
24356
|
}
|
|
24318
24357
|
return true;
|
|
24319
24358
|
});
|
|
24320
24359
|
_classPrivateFieldInitSpec(this, _maybeSetupNetworkConditions, async session => {
|
|
24321
|
-
if (
|
|
24360
|
+
if (_classPrivateFieldGet(_blocklist, this).length === 0 && _classPrivateFieldGet(_allowlist, this).length === 0) {
|
|
24322
24361
|
return;
|
|
24323
24362
|
}
|
|
24324
|
-
const matchedNetworkConditions =
|
|
24325
|
-
|
|
24326
|
-
|
|
24363
|
+
const matchedNetworkConditions = [];
|
|
24364
|
+
for (const item of _classPrivateFieldGet(_blocklist, this)) {
|
|
24365
|
+
matchedNetworkConditions.push({
|
|
24366
|
+
urlPattern: item.rule,
|
|
24367
|
+
offline: true,
|
|
24327
24368
|
latency: 0,
|
|
24328
24369
|
downloadThroughput: -1,
|
|
24329
24370
|
uploadThroughput: -1
|
|
24330
|
-
};
|
|
24331
|
-
}
|
|
24371
|
+
});
|
|
24372
|
+
}
|
|
24373
|
+
if (_classPrivateFieldGet(_allowlist, this).length > 0) {
|
|
24374
|
+
for (const item of _classPrivateFieldGet(_allowlist, this)) {
|
|
24375
|
+
matchedNetworkConditions.push({
|
|
24376
|
+
urlPattern: item.rule,
|
|
24377
|
+
offline: false,
|
|
24378
|
+
latency: 0,
|
|
24379
|
+
downloadThroughput: -1,
|
|
24380
|
+
uploadThroughput: -1
|
|
24381
|
+
});
|
|
24382
|
+
}
|
|
24383
|
+
matchedNetworkConditions.push({
|
|
24384
|
+
urlPattern: '',
|
|
24385
|
+
offline: true,
|
|
24386
|
+
latency: 0,
|
|
24387
|
+
downloadThroughput: -1,
|
|
24388
|
+
uploadThroughput: -1
|
|
24389
|
+
});
|
|
24390
|
+
}
|
|
24332
24391
|
await session.send('Network.emulateNetworkConditionsByRule', {
|
|
24333
|
-
|
|
24334
|
-
offline: true
|
|
24392
|
+
// @ts-expect-error offline cannot be undefined before M149.
|
|
24393
|
+
offline: _classPrivateFieldGet(_blocklist, this).length > 0 ? true : undefined,
|
|
24394
|
+
matchedNetworkConditions
|
|
24335
24395
|
});
|
|
24336
24396
|
});
|
|
24397
|
+
if (blocklist && allowlist) {
|
|
24398
|
+
throw new Error('Cannot specify both blockList and allowList');
|
|
24399
|
+
}
|
|
24337
24400
|
_classPrivateFieldSet(_connection4, this, connection);
|
|
24338
24401
|
_classPrivateFieldSet(_targetFilterCallback, this, targetFilterCallback);
|
|
24339
24402
|
_classPrivateFieldSet(_targetFactory, this, targetFactory);
|
|
24340
24403
|
_classPrivateFieldSet(_waitForInitiallyDiscoveredTargets, this, waitForInitiallyDiscoveredTargets);
|
|
24341
|
-
_classPrivateFieldSet(
|
|
24404
|
+
_classPrivateFieldSet(_blocklist, this, _assertClassBrand(_TargetManager_brand, this, _mapPatterns).call(this, blocklist));
|
|
24405
|
+
_classPrivateFieldSet(_allowlist, this, _assertClassBrand(_TargetManager_brand, this, _mapPatterns).call(this, allowlist));
|
|
24342
24406
|
_classPrivateFieldGet(_connection4, this).on('Target.targetCreated', _classPrivateFieldGet(_onTargetCreated, this));
|
|
24343
24407
|
_classPrivateFieldGet(_connection4, this).on('Target.targetDestroyed', _classPrivateFieldGet(_onTargetDestroyed, this));
|
|
24344
24408
|
_classPrivateFieldGet(_connection4, this).on('Target.targetInfoChanged', _classPrivateFieldGet(_onTargetInfoChanged, this));
|
|
@@ -24431,6 +24495,16 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24431
24495
|
_classPrivateFieldGet(_initializeDeferred, this).resolve();
|
|
24432
24496
|
}
|
|
24433
24497
|
}
|
|
24498
|
+
function _mapPatterns(rules) {
|
|
24499
|
+
const result = [];
|
|
24500
|
+
for (const rule of rules ?? []) {
|
|
24501
|
+
result.push({
|
|
24502
|
+
pattern: new Y(rule),
|
|
24503
|
+
rule
|
|
24504
|
+
});
|
|
24505
|
+
}
|
|
24506
|
+
return result;
|
|
24507
|
+
}
|
|
24434
24508
|
function isDevToolsPageTarget(url) {
|
|
24435
24509
|
return url.startsWith('devtools://devtools/bundled/devtools_app.html');
|
|
24436
24510
|
}
|
|
@@ -24458,8 +24532,15 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24458
24532
|
var _onTargetChanged = /*#__PURE__*/new WeakMap();
|
|
24459
24533
|
var _onTargetDiscovered = /*#__PURE__*/new WeakMap();
|
|
24460
24534
|
class CdpBrowser extends Browser {
|
|
24461
|
-
static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false,
|
|
24462
|
-
const browser = new CdpBrowser(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, issuesEnabled, handleDevToolsAsPage,
|
|
24535
|
+
static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false, blocklist, allowlist) {
|
|
24536
|
+
const browser = new CdpBrowser(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, issuesEnabled, handleDevToolsAsPage, blocklist, allowlist);
|
|
24537
|
+
if (allowlist) {
|
|
24538
|
+
const version = await _assertClassBrand(_CdpBrowser_brand, browser, _getVersion).call(browser);
|
|
24539
|
+
const majorVersion = parseInt(version.product.match(/\d+/)?.[0] ?? '0', 10);
|
|
24540
|
+
if (majorVersion < 149) {
|
|
24541
|
+
throw new Error('The allowlist option require Chrome 149 or greater.');
|
|
24542
|
+
}
|
|
24543
|
+
}
|
|
24463
24544
|
if (acceptInsecureCerts) {
|
|
24464
24545
|
await connection.send('Security.setIgnoreCertificateErrors', {
|
|
24465
24546
|
ignore: true
|
|
@@ -24468,7 +24549,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24468
24549
|
await browser._attach(downloadBehavior);
|
|
24469
24550
|
return browser;
|
|
24470
24551
|
}
|
|
24471
|
-
constructor(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, _isPageTargetCallback2, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false,
|
|
24552
|
+
constructor(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, _isPageTargetCallback2, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false, blocklist, allowlist) {
|
|
24472
24553
|
super();
|
|
24473
24554
|
_classPrivateMethodInitSpec(this, _CdpBrowser_brand);
|
|
24474
24555
|
_defineProperty(this, "protocol", 'cdp');
|
|
@@ -24545,7 +24626,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24545
24626
|
}));
|
|
24546
24627
|
_classPrivateFieldSet(_handleDevToolsAsPage, this, handleDevToolsAsPage);
|
|
24547
24628
|
_assertClassBrand(_CdpBrowser_brand, this, _setIsPageTargetCallback).call(this, _isPageTargetCallback2);
|
|
24548
|
-
_classPrivateFieldSet(_targetManager3, this, new TargetManager(connection, _classPrivateFieldGet(_createTarget, this), _classPrivateFieldGet(_targetFilterCallback2, this), waitForInitiallyDiscoveredTargets,
|
|
24629
|
+
_classPrivateFieldSet(_targetManager3, this, new TargetManager(connection, _classPrivateFieldGet(_createTarget, this), _classPrivateFieldGet(_targetFilterCallback2, this), waitForInitiallyDiscoveredTargets, blocklist, allowlist));
|
|
24549
24630
|
_classPrivateFieldSet(_defaultContext, this, new CdpBrowserContext(_classPrivateFieldGet(_connection5, this), this));
|
|
24550
24631
|
for (const contextId of contextIds) {
|
|
24551
24632
|
_classPrivateFieldGet(_contexts, this).set(contextId, new CdpBrowserContext(_classPrivateFieldGet(_connection5, this), this, contextId));
|
|
@@ -24657,19 +24738,22 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24657
24738
|
const openDevToolsResponse = await _classPrivateFieldGet(_connection5, this).send('Target.openDevTools', {
|
|
24658
24739
|
targetId: pageTargetId
|
|
24659
24740
|
});
|
|
24741
|
+
return await this._getDevToolsTargetPage(openDevToolsResponse.targetId);
|
|
24742
|
+
}
|
|
24743
|
+
async _getDevToolsTargetPage(devtoolsTargetId) {
|
|
24660
24744
|
const target = await this.waitForTarget(t => {
|
|
24661
|
-
return t._targetId ===
|
|
24745
|
+
return t._targetId === devtoolsTargetId;
|
|
24662
24746
|
});
|
|
24663
24747
|
if (!target) {
|
|
24664
|
-
throw new Error(`Missing target for DevTools page (id = ${
|
|
24748
|
+
throw new Error(`Missing target for DevTools page (id = ${devtoolsTargetId})`);
|
|
24665
24749
|
}
|
|
24666
24750
|
const initialized = (await target._initializedDeferred.valueOrThrow()) === exports.InitializationStatus.SUCCESS;
|
|
24667
24751
|
if (!initialized) {
|
|
24668
|
-
throw new Error(`Failed to create target for DevTools page (id = ${
|
|
24752
|
+
throw new Error(`Failed to create target for DevTools page (id = ${devtoolsTargetId})`);
|
|
24669
24753
|
}
|
|
24670
24754
|
const page = await target.page();
|
|
24671
24755
|
if (!page) {
|
|
24672
|
-
throw new Error(`Failed to create a DevTools Page for target (id = ${
|
|
24756
|
+
throw new Error(`Failed to create a DevTools Page for target (id = ${devtoolsTargetId})`);
|
|
24673
24757
|
}
|
|
24674
24758
|
return page;
|
|
24675
24759
|
}
|
|
@@ -24844,7 +24928,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24844
24928
|
protocolTimeout,
|
|
24845
24929
|
handleDevToolsAsPage,
|
|
24846
24930
|
idGenerator = createIncrementalIdGenerator(),
|
|
24847
|
-
|
|
24931
|
+
blocklist,
|
|
24932
|
+
allowlist
|
|
24848
24933
|
} = options;
|
|
24849
24934
|
const connection = new Connection(url, connectionTransport, slowMo, protocolTimeout, /* rawErrors */false, idGenerator);
|
|
24850
24935
|
const {
|
|
@@ -24852,7 +24937,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
24852
24937
|
} = await connection.send('Target.getBrowserContexts');
|
|
24853
24938
|
const browser = await CdpBrowser._create(connection, browserContextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, undefined, () => {
|
|
24854
24939
|
return connection.send('Browser.close').catch(debugError);
|
|
24855
|
-
}, targetFilter, isPageTarget, undefined, networkEnabled, issuesEnabled, handleDevToolsAsPage,
|
|
24940
|
+
}, targetFilter, isPageTarget, undefined, networkEnabled, issuesEnabled, handleDevToolsAsPage, blocklist, allowlist);
|
|
24856
24941
|
return browser;
|
|
24857
24942
|
}
|
|
24858
24943
|
const tabTargetInfo = {
|
|
@@ -26734,6 +26819,9 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
26734
26819
|
* @internal
|
|
26735
26820
|
*/
|
|
26736
26821
|
async function _connectToBrowser(options) {
|
|
26822
|
+
if (options.blocklist && options.allowlist) {
|
|
26823
|
+
throw new Error('Cannot specify both blocklist and allowlist');
|
|
26824
|
+
}
|
|
26737
26825
|
const {
|
|
26738
26826
|
connectionTransport,
|
|
26739
26827
|
endpointUrl
|
|
@@ -26976,9 +27064,9 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
|
|
|
26976
27064
|
* @internal
|
|
26977
27065
|
*/
|
|
26978
27066
|
const PUPPETEER_REVISIONS = Object.freeze({
|
|
26979
|
-
chrome: '
|
|
26980
|
-
'chrome-headless-shell': '
|
|
26981
|
-
firefox: '
|
|
27067
|
+
chrome: '148.0.7778.97',
|
|
27068
|
+
'chrome-headless-shell': '148.0.7778.97',
|
|
27069
|
+
firefox: 'stable_150.0.1'
|
|
26982
27070
|
});
|
|
26983
27071
|
|
|
26984
27072
|
/**
|
|
@@ -2430,8 +2430,8 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
|
|
|
2430
2430
|
/** @internal */
|
|
2431
2431
|
[asyncDisposeSymbol](): Promise<void>;
|
|
2432
2432
|
/**
|
|
2433
|
-
* Opens DevTools for the
|
|
2434
|
-
* method is only available in Chrome.
|
|
2433
|
+
* Opens DevTools for the this page if not already open and returns the DevTools page.
|
|
2434
|
+
* This method is only available in Chrome.
|
|
2435
2435
|
*/
|
|
2436
2436
|
abstract openDevTools(): Promise<Page>;
|
|
2437
2437
|
/**
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts
CHANGED
|
@@ -211,9 +211,10 @@ export declare abstract class Locator<T> extends EventEmitter<LocatorEvents> {
|
|
|
211
211
|
* Fills out the input identified by the locator using the provided value. The
|
|
212
212
|
* type of the input is determined at runtime and the appropriate fill-out
|
|
213
213
|
* method is chosen based on the type. `contenteditable`, select, textarea and
|
|
214
|
-
* input elements are supported.
|
|
214
|
+
* input elements are supported. For checkboxes, radio buttons and switches
|
|
215
|
+
* specify a boolean value.
|
|
215
216
|
*/
|
|
216
|
-
fill<ElementType extends Element>(this: Locator<ElementType>, value: string, options?: Readonly<LocatorFillOptions>): Promise<void>;
|
|
217
|
+
fill<ElementType extends Element>(this: Locator<ElementType>, value: string | boolean, options?: Readonly<LocatorFillOptions>): Promise<void>;
|
|
217
218
|
/**
|
|
218
219
|
* Hovers over the located element.
|
|
219
220
|
*/
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locators.d.ts","sourceRoot":"","sources":["../../../../../src/api/locators/locators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,mCAAmC,CA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,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAsB5E;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAWvE;;GAEG;AACH,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;;IAC5C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EACxC,QAAQ,EAAE,CAAC,GACV,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gBAOzB,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAKtC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAQxB,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAO5E;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,MAAM,CAAC"}
|
|
@@ -308,22 +308,28 @@ export class Locator extends EventEmitter {
|
|
|
308
308
|
return 'typeable-input';
|
|
309
309
|
}
|
|
310
310
|
if (el instanceof HTMLInputElement) {
|
|
311
|
-
|
|
312
|
-
'
|
|
313
|
-
'
|
|
314
|
-
|
|
315
|
-
'
|
|
316
|
-
'
|
|
317
|
-
'
|
|
318
|
-
'
|
|
319
|
-
'
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
311
|
+
switch (el.type) {
|
|
312
|
+
case 'checkbox':
|
|
313
|
+
case 'radio':
|
|
314
|
+
return 'checkable-input';
|
|
315
|
+
case 'text':
|
|
316
|
+
case 'url':
|
|
317
|
+
case 'tel':
|
|
318
|
+
case 'search':
|
|
319
|
+
case 'password':
|
|
320
|
+
case 'number':
|
|
321
|
+
case 'email':
|
|
322
|
+
return 'typeable-input';
|
|
323
|
+
default:
|
|
324
|
+
return 'other-input';
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
+
switch (el.getAttribute('role')) {
|
|
328
|
+
case 'checkbox':
|
|
329
|
+
case 'radio':
|
|
330
|
+
case 'switch':
|
|
331
|
+
return 'checkable-input';
|
|
332
|
+
}
|
|
327
333
|
if (el.isContentEditable) {
|
|
328
334
|
return 'contenteditable';
|
|
329
335
|
}
|
|
@@ -334,45 +340,68 @@ export class Locator extends EventEmitter {
|
|
|
334
340
|
return from(handle.focus()).pipe(mergeMap(() => {
|
|
335
341
|
return from(handle.evaluate((input, newValue) => {
|
|
336
342
|
const element = input;
|
|
343
|
+
const valString = String(newValue);
|
|
337
344
|
const currentValue = element.isContentEditable
|
|
338
345
|
? element.innerText
|
|
339
346
|
: element.value;
|
|
340
|
-
if (currentValue ===
|
|
347
|
+
if (currentValue === valString) {
|
|
341
348
|
return;
|
|
342
349
|
}
|
|
343
350
|
if (element.isContentEditable) {
|
|
344
|
-
element.innerText =
|
|
351
|
+
element.innerText = valString;
|
|
345
352
|
}
|
|
346
353
|
else {
|
|
347
|
-
element.value =
|
|
354
|
+
element.value = valString;
|
|
348
355
|
}
|
|
349
356
|
element.dispatchEvent(new Event('input', { bubbles: true }));
|
|
350
357
|
element.dispatchEvent(new Event('change', { bubbles: true }));
|
|
351
358
|
}, value));
|
|
352
359
|
}));
|
|
353
360
|
};
|
|
361
|
+
const toggleIfNeeded = () => {
|
|
362
|
+
return from(handle.evaluate(toggleEl => {
|
|
363
|
+
if (toggleEl.indeterminate ||
|
|
364
|
+
toggleEl.getAttribute('aria-checked') === 'mixed') {
|
|
365
|
+
return 'mixed';
|
|
366
|
+
}
|
|
367
|
+
return (toggleEl.checked ||
|
|
368
|
+
toggleEl.getAttribute('aria-checked') === 'true');
|
|
369
|
+
})).pipe(mergeMap(currentState => {
|
|
370
|
+
if (currentState === 'mixed' || currentState !== !!value) {
|
|
371
|
+
return from(handle.click());
|
|
372
|
+
}
|
|
373
|
+
return of(undefined);
|
|
374
|
+
}));
|
|
375
|
+
};
|
|
354
376
|
switch (inputType) {
|
|
377
|
+
case 'checkable-input':
|
|
378
|
+
return toggleIfNeeded();
|
|
355
379
|
case 'select':
|
|
356
380
|
return from(handle.select(value).then(noop));
|
|
357
381
|
case 'contenteditable':
|
|
358
382
|
case 'typeable-input':
|
|
359
|
-
if (value
|
|
383
|
+
if (typeof value === 'string' &&
|
|
384
|
+
value.length < typingThreshold) {
|
|
360
385
|
return from(handle.evaluate((input, newValue) => {
|
|
361
386
|
const element = input;
|
|
387
|
+
const valString = String(newValue);
|
|
362
388
|
const currentValue = element.isContentEditable
|
|
363
389
|
? element.innerText
|
|
364
390
|
: input.value;
|
|
391
|
+
if (currentValue === valString) {
|
|
392
|
+
return '';
|
|
393
|
+
}
|
|
365
394
|
// Clear the input if the current value does not match the filled
|
|
366
395
|
// out value.
|
|
367
|
-
if (
|
|
368
|
-
!
|
|
396
|
+
if (!valString.startsWith(currentValue) ||
|
|
397
|
+
!currentValue) {
|
|
369
398
|
if (element.isContentEditable) {
|
|
370
399
|
element.innerText = '';
|
|
371
400
|
}
|
|
372
401
|
else {
|
|
373
402
|
input.value = '';
|
|
374
403
|
}
|
|
375
|
-
return
|
|
404
|
+
return valString;
|
|
376
405
|
}
|
|
377
406
|
// If the value is partially filled out, only type the rest. Move
|
|
378
407
|
// cursor to the end of the common prefix.
|
|
@@ -384,7 +413,7 @@ export class Locator extends EventEmitter {
|
|
|
384
413
|
input.value = '';
|
|
385
414
|
input.value = currentValue;
|
|
386
415
|
}
|
|
387
|
-
return
|
|
416
|
+
return valString.substring(currentValue.length);
|
|
388
417
|
}, value)).pipe(mergeMap(textToType => {
|
|
389
418
|
if (!textToType) {
|
|
390
419
|
return of(undefined);
|
|
@@ -530,7 +559,8 @@ export class Locator extends EventEmitter {
|
|
|
530
559
|
* Fills out the input identified by the locator using the provided value. The
|
|
531
560
|
* type of the input is determined at runtime and the appropriate fill-out
|
|
532
561
|
* method is chosen based on the type. `contenteditable`, select, textarea and
|
|
533
|
-
* input elements are supported.
|
|
562
|
+
* input elements are supported. For checkboxes, radio buttons and switches
|
|
563
|
+
* specify a boolean value.
|
|
534
564
|
*/
|
|
535
565
|
fill(value, options) {
|
|
536
566
|
return firstValueFrom(this.#fill(value, options));
|