Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Feb 28, 2024
1 parent 61b0951 commit 0a4df4d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- add support for cancelling a launch via an `AbortController`

## [0.8.1](https://github.com/arianrhodsandlot/nostalgist/compare/v0.8.0...v0.8.1) - 2024-02-24
Expand Down
22 changes: 22 additions & 0 deletions docs/src/content/docs/apis/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,28 @@ const nostalgist = await Nostalgist.launch({
In most cases, it is recommended to specify the size of the element through CSS or the `style` parameter first.
+ #### `signal`
**type:** `Object`
**since:** `0.9.0`
An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) object used for cancelling a launch.
Here is an example,
```js
const abortController = new AbortController()
// Cancel the launch after 500ms
setTimeout(() => abortController.abort(), 500)
const nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
signal: abortController.signal,
})
```
+ #### `runEmulatorManually`
**type:** `boolean` **default:** `false`
Expand Down

0 comments on commit 0a4df4d

Please sign in to comment.