Skip to content

[docs] Clarify Page.Viewport x and y properties #67

@joshsleeper

Description

@joshsleeper

problem

The descriptions for the x and y properties on Page.Viewport are sufficiently vague in the context of Page.captureScreenshot.clip that the Puppeteer team made the mistake of interpreting them as x and y values for the element relative to the current viewport.

Unfortunately, they are actually used in Chromium as x and y values for the viewport relative to the document.

solution

I would suggest clarifying the description strings for these properties.

relevant code

Puppeteer issue describing the problem

puppeteer/puppeteer#1315

Puppeteer PR to resolve the mistake

puppeteer/puppeteer#1323

Chromium usage

https://github.com/ChromeDevTools/devtools-protocol/blob/master/json/browser_protocol.json#L262-L263

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions