Skip to content

Commit

Permalink
Canvas.toDataURL: Rename encoderOptions argument to quality (#37190)
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel-rowe authored Dec 12, 2024
1 parent c6a9fa0 commit 7c2a91a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/en-us/web/api/htmlcanvaselement/todataurl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ The created image data will have a resolution of 96dpi for file formats that sup
```js-nolint
toDataURL()
toDataURL(type)
toDataURL(type, encoderOptions)
toDataURL(type, quality)
```

### Parameters

- `type` {{optional_inline}}
- : A string indicating the image format.
The default type is `image/png`; this image format will be also used if the specified type is not supported.
- `encoderOptions` {{optional_inline}}
- `quality` {{optional_inline}}
- : A {{jsxref("Number")}} between `0` and `1` indicating the image quality to be used when creating images using file formats that support lossy compression (such as `image/jpeg` or `image/webp`).
A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range.

Expand Down

0 comments on commit 7c2a91a

Please sign in to comment.