Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Notes on document

...

The ScreenSnippet API is used to capture a snippet of their desktop (unconstrained by the host application window) and highlight portions of this snippet so it can then be consumed by the host application.  This functionality is similar to the Windows Screen Snippet tool that when used in rectangle capture mode.  This lets a user captures portions of the Windows Desktop, highlight aspects of the image and then save this image for sharing.

...

Creates a new instance of the ScreenSnippet object.

Syntax

Code Block
languagejs
let mySnippet = new ScreenSnippet();

...

Code Block
languagejs
let mySnippet = new ssf.ScreenSnippet();

Parameters

None.

Methods

Code Block
languagejs
capture()

Creates a new instance of the ScreenSnippet object.

Syntax

Code Block
languagejs
mySnippet.capture().then(function(bitmap) { ... });

Parameters

none

Returns

A Promise that resolves to an ImageBitmap object with contains the captured image and type.

...


Discussion points:

  • (From Gareth) I've assumed we have a preference for promises vs callbacks.  This seems inline with modern HTML5 standards which are deprecating callbacks. 

  • (From Gareth) We should discuss the return object for the capture method.  I've currently followed the Minuet approach.