From ce341ae5b5bab44d0f489b99be4b8b38880ac6fa Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 1 Aug 2023 11:45:58 -0700 Subject: [PATCH] docs: clarify setContent semantics (#24553) Fixes https://github.com/microsoft/playwright/issues/24503 --- docs/src/api/class-frame.md | 2 ++ docs/src/api/class-page.md | 2 ++ packages/playwright-core/types/types.d.ts | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index c05e9e3fa9..6cd0c5132b 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -1610,6 +1610,8 @@ When all steps combined have not finished during the specified [`option: timeout ## async method: Frame.setContent * since: v1.8 +This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write), inheriting all its specific characteristics and behaviors. + ### param: Frame.setContent.html * since: v1.8 - `html` <[string]> diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index bbf3446417..afac224905 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -3531,6 +3531,8 @@ When all steps combined have not finished during the specified [`option: timeout ## async method: Page.setContent * since: v1.8 +This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write), inheriting all its specific characteristics and behaviors. + ### param: Page.setContent.html * since: v1.8 - `html` <[string]> diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index aeca2bae95..6631353f8f 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -3815,6 +3815,8 @@ export interface Page { }): Promise; /** + * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write), + * inheriting all its specific characteristics and behaviors. * @param html HTML markup to assign to the page. * @param options */ @@ -6900,6 +6902,8 @@ export interface Frame { }): Promise; /** + * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write), + * inheriting all its specific characteristics and behaviors. * @param html HTML markup to assign to the page. * @param options */