@doenet/doenetml-iframe 0.7.24-dev.496 → 0.7.24-dev.497
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/README.md +17 -4
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -420,14 +420,27 @@ respond:
|
|
|
420
420
|
{ subject: "SPLICE.getState.response", message_id, state }
|
|
421
421
|
```
|
|
422
422
|
|
|
423
|
+
Quote the `message_id`: a response carrying state is only read by the viewer
|
|
424
|
+
whose request it names. Replies reach every viewer in the window, and `cid`
|
|
425
|
+
cannot tell two of them apart — it hashes the DoenetML text alone, so a
|
|
426
|
+
second attempt at the same document, or that document opened twice on a
|
|
427
|
+
page, carries the identical `cid`. An unaddressed answer would be restored
|
|
428
|
+
by all of them.
|
|
429
|
+
|
|
423
430
|
If there is no saved state, no response is needed. To surface a load
|
|
424
431
|
failure to the student instead, respond with
|
|
425
|
-
`{ subject: "SPLICE.getState.response", error: { code, message } }
|
|
426
|
-
|
|
432
|
+
`{ subject: "SPLICE.getState.response", error: { code, message } }`,
|
|
433
|
+
either quoting the request's `message_id` or leaving it out — an error is
|
|
434
|
+
the one reply the viewer will take unaddressed, since the worst it costs is
|
|
435
|
+
a message the next usable answer clears. Prefer quoting it even so: an
|
|
436
|
+
unaddressed error is taken by whichever request is open when it lands, on
|
|
437
|
+
every viewer on the page, including one a rebuild opened after the error was
|
|
438
|
+
sent. A reply quoting a *different* id is ignored, since that id belongs to
|
|
439
|
+
some other request.
|
|
427
440
|
|
|
428
441
|
A request has a single answer: the **first** response carrying state for
|
|
429
|
-
this `cid` is the one the viewer reboots from, and
|
|
430
|
-
|
|
442
|
+
this `cid` is the one the viewer reboots from, and every response after
|
|
443
|
+
that — errors included — is ignored. A response with no state — or state for a
|
|
431
444
|
different `cid` — does not count as that answer, so a listener with nothing
|
|
432
445
|
saved cannot shut out one still in flight. Answer once, out of durable
|
|
433
446
|
storage: a host that replies from an in-memory cache first and from storage
|
package/index.js
CHANGED
|
@@ -68534,7 +68534,7 @@ function ExternalVirtualKeyboard({
|
|
|
68534
68534
|
}
|
|
68535
68535
|
);
|
|
68536
68536
|
}
|
|
68537
|
-
const version = "0.7.24-dev.
|
|
68537
|
+
const version = "0.7.24-dev.497";
|
|
68538
68538
|
const latestDoenetmlVersion = version;
|
|
68539
68539
|
function subscribeToPinnedTheme() {
|
|
68540
68540
|
return () => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@doenet/doenetml-iframe",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "A renderer for DoenetML contained in an iframe",
|
|
5
|
-
"version": "0.7.24-dev.
|
|
5
|
+
"version": "0.7.24-dev.497",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"homepage": "https://github.com/Doenet/DoenetML#readme",
|
|
8
8
|
"repository": {
|