We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f2c92e commit 1b71e52Copy full SHA for 1b71e52
src/client/inspect.js
@@ -1,15 +1,14 @@
1
import {Inspector} from "observablehq:runtime";
2
3
export function inspect(value) {
4
- const inspector = new Inspector(document.createElement("div"));
5
- inspector.fulfilled(value);
6
- return inspector._node.firstChild;
+ const node = document.createElement("div");
+ new Inspector(node).fulfilled(value);
+ return node;
7
}
8
9
export function inspectError(value) {
10
11
- inspector.rejected(value);
12
- const node = inspector._node.firstChild;
+ new Inspector(node).rejected(value);
13
node.classList.add("observablehq--error");
14
return node;
15
0 commit comments