dewdrop-sdk 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/session.js +4 -1
package/package.json
CHANGED
package/src/session.js
CHANGED
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
// by calling it, and `exit()` ends nothing: the console says so, once. The
|
|
23
23
|
// game here is the browser's own window, which already takes any shape and
|
|
24
24
|
// fires its own `resize`, so `allowPortrait()` changes nothing and says
|
|
25
|
-
// what it does on Dewdrop, once.
|
|
25
|
+
// what it does on Dewdrop, once. `session.dev` is true in the game's dev
|
|
26
|
+
// version and false once it is published, in a backend too; `npm run dev`
|
|
27
|
+
// is development, so here it is true.
|
|
26
28
|
import { defineHandlers, side } from './net.js';
|
|
27
29
|
|
|
28
30
|
let told = false;
|
|
29
31
|
let toldPortrait = false;
|
|
30
32
|
class Session extends EventTarget {
|
|
31
33
|
get ending() { return null; }
|
|
34
|
+
get dev() { return true; }
|
|
32
35
|
exit() {
|
|
33
36
|
if (side.backend) throw new DOMException('session.exit is unavailable in a backend', 'NotSupportedError');
|
|
34
37
|
if (told) return;
|