# stdlib
**Repository Path**: your_sugar/stdlib
## Basic Information
- **Project Name**: stdlib
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: ISC
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-02-18
- **Last Updated**: 2024-10-12
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# @observablehq/stdlib
[](https://github.com/observablehq/stdlib/actions?workflow=Node+CI)
The Observable standard library.
For examples, see https://observablehq.com/@observablehq/standard-library.
## API Reference
* [DOM](#dom) - create HTML and SVG elements.
* [Files](#files) - read local files into memory.
* [FileAttachments](#file-attachments) - read remote files.
* [Generators](#generators) - utilities for generators and iterators.
* [Promises](#promises) - utilities for promises.
* [require](#require) - load third-party libraries.
* [html](#html) - render HTML.
* [md](#markdown) - render Markdown.
* [svg](#svg) - render SVG.
* [tex](#tex) - render LaTeX.
* [now](#now) - the current value of Date.now.
* [width](#width) - the current page width.
* [invalidation](#invalidation) - dispose resources.
* [visibility](#visibility) - wait for visibility.
### DOM
# DOM.canvas(width, height) [<>](https://github.com/observablehq/stdlib/blob/master/src/dom/canvas.js "Source")
Returns a new canvas element with the specified *width* and *height*. For example, to create a 960×500 canvas:
```js
DOM.canvas(960, 500)
```
This is equivalent to using the [html](#html) tagged template literal:
```js
html`