diff --git a/index.html b/index.html index a607412f5..aeb3cdf53 100644 --- a/index.html +++ b/index.html @@ -1010,6 +1010,12 @@
WebDriver provides the Take Screenshot command to capture the top-level browsing context’s initial viewport, + and the Take Full Screenshot command + to capture the scrollable region of the top-level browsing context’s scrolling element, and a command Take Element Screenshot for doing the same with the visible region of an element’s bounding rectangle after it has been scrolled into view. @@ -9082,6 +9090,45 @@
Return success with canvas. +
In order to draw a scrollable region from the framebuffer, + given a scrolling element: + +
If either the initial viewport’s width or height + is 0 CSS pixels, + return error with error code unable to capture screen. + +
Let canvas be a new canvas
element,
+ and set its width
+ and height
+ to scrolling element scrollWidth and scrollHeight, respectively.
+
+
Let context, a canvas context mode, + be the result of invoking the 2D context creation algorithm + given canvas as the target. + +
Complete implementation specific steps equivalent to + drawing the region of the framebuffer + specified by the following coordinates onto context: + +
Return success with canvas. +
To encode a canvas as
Base64 a canvas
element:
@@ -9152,6 +9199,47 @@
HTTP Method | +URI Template | +
---|---|
GET | +/session/{session id}/screenshot/full | +
The remote end steps are: + +
If the current top-level browsing context is no longer open, + return error with error code no such window. + +
When the user agent is next to run the animation frame callbacks: +
Let screenshot result be the result of trying to call + draw a scrollable region from the framebuffer, + given scrolling element as an argument. + +
Let canvas be a canvas
element
+ of screenshot result’s data.
+
+
Let encoding result be the result of trying + encoding a canvas as Base64 canvas. + +
Let encoded string be encoding result’s data. +
Return success with data encoded string. +