Skip to content

Commit c474dce

Browse files
committed
Added JSON.stringify() per @glenrobson
1 parent 4d30998 commit c474dce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

recipe/0599-drag-and-drop/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The example json document must be an external document, and imported with the fo
3333

3434
<script>
3535
function drag(ev) {
36-
ev.dataTransfer.setData("text/plain", {
36+
ev.dataTransfer.setData("text/plain", JSON.stringify({
3737
"@context": "http://iiif.io/api/presentation/3/context.json",
3838
"id": "https://example.org/content-states/1",
3939
"type": "Annotation",
@@ -42,7 +42,7 @@ The example json document must be an external document, and imported with the fo
4242
"id": "https://iiif.io/api/cookbook/recipe/0006-text-language/manifest.json",
4343
"type": "Manifest"
4444
}
45-
});
45+
}));
4646
}
4747
</script>
4848

0 commit comments

Comments
 (0)