Skip to content

Commit

Permalink
publish: 6.22.37
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Oct 28, 2019
1 parent 353e913 commit f62950d
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 6 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,24 @@ By default dosbox mouse will follow browser cursor without locking. It means tha
});
```

### Fullscreen

JsDos provides very basic support for entering fullscreen mode. You can request to enter
fullscreen mode using [CommandInterface.fullscreen()](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-ci).

```js
<button onclick="ci.fullscreen()">Fullscreen</button>
<script>
Dos(canvas).ready((fs, main) => {
main([...]).then((ci) => {
window.ci = ci;
});
});
</script>
```

**NOTE:** This function can be called anywhere, but for web security reasons its associated request can only be raised inside the event handler for a user-generated event (for example a key, mouse or touch press/release).

### Multiple dosbox instances on one page

JsDos already support multiple instances, just create new canvas for each jsdos and
Expand Down
4 changes: 2 additions & 2 deletions dist/docs/api/js-dos-ts/js-dos-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ gulpfile.js --> generateBuildInfo
```
export const Build = {
version: "6.22.36 (ae0ccc95b30d8b671c0fd81d1997a695)",
jsVersion: "e458350f35a2c3a331959275d81894133a4cdcf5",
version: "6.22.37 (2b23342d2ba488bb3653b8506b7e2667)",
jsVersion: "353e9136ae42c6641ab325375f89ac2f17245287",
jsSize: 199660,
wasmVersion: "eb83536935802be3c617c911dfce7e28",
wasmSize: 1809140,
Expand Down
21 changes: 21 additions & 0 deletions dist/docs/api/js-dos-ts/js-dos-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ export class DosCommandInterface {



* `fullscreen()` - enters fullscreen mode
This function can be called anywhere, but for web security reasons its associated request can only be raised
inside the event handler for a user-generated event (for example a key, mouse or touch press/release).




```
public fullscreen() {
this.dos.canvas.requestFullscreen()
}
```







* `shell([cmd1, cmd2, ...])` - executes passed commands
in dosbox shell if it's runned, returns Promise that
resolves when commands sequence is executed
Expand Down
4 changes: 2 additions & 2 deletions js-dos-ts/js-dos-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// gulpfile.js --> generateBuildInfo

export const Build = {
version: "6.22.36 (ae0ccc95b30d8b671c0fd81d1997a695)",
jsVersion: "e458350f35a2c3a331959275d81894133a4cdcf5",
version: "6.22.37 (2b23342d2ba488bb3653b8506b7e2667)",
jsVersion: "353e9136ae42c6641ab325375f89ac2f17245287",
jsSize: 199660,
wasmVersion: "eb83536935802be3c617c911dfce7e28",
wasmSize: 1809140,
Expand Down
7 changes: 7 additions & 0 deletions js-dos-ts/js-dos-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ export class DosCommandInterface {
return this.dos.canvas.height;
}

// * `fullscreen()` - enters fullscreen mode
// This function can be called anywhere, but for web security reasons its associated request can only be raised
// inside the event handler for a user-generated event (for example a key, mouse or touch press/release).
public fullscreen() {
this.dos.canvas.requestFullscreen()
}

// * `shell([cmd1, cmd2, ...])` - executes passed commands
// in dosbox shell if it's runned, returns Promise that
// resolves when commands sequence is executed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-dos",
"version": "6.22.36",
"version": "6.22.37",
"description": "Easiest API to run dos programs in browser",
"main": "dist/js-dos.js",
"types": "dist/typescript/js-dos.ts",
Expand Down
3 changes: 2 additions & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<body>
<canvas id="jsdos"></canvas>
<script>
Dos(document.getElementById("jsdos"), {
Dos(document.getElementById("jsdos"), {
wdosboxUrl: "",
cycles: 1000,
}).ready((fs, main) => {
fs.extract("test/digger.zip").then(() => {
Expand Down

0 comments on commit f62950d

Please sign in to comment.