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 53ab0e2 commit e0cf738Copy full SHA for e0cf738
src/lib/serialize.ts
@@ -2,7 +2,7 @@ import type {CellSpec, Cell, Notebook, NotebookTheme} from "./notebook.js";
2
import {toNotebook} from "./notebook.js";
3
import {isEmpty} from "./text.js";
4
5
-export function serialize(notebook: Notebook, {document = window.document} = {}): string {
+export function serialize(notebook: Notebook, {document = globalThis.document} = {}): string {
6
const _notebook = document.createElement("notebook");
7
_notebook.setAttribute("theme", notebook.theme);
8
if (notebook.readOnly) _notebook.setAttribute("readonly", "");
0 commit comments