Skip to content

Commit 12794f6

Browse files
committed
Add setting of frame & context in permalink.
1 parent 086d452 commit 12794f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

playground/next/editor.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ window.app = createApp({
353353
const url = new URL(window.location);
354354
const hash = new URLSearchParams();
355355
hash.set('json-ld', JSON.stringify(this.doc));
356+
if (this.contextDoc && JSON.stringify(this.contextDoc) !== '{}') {
357+
hash.set('context', JSON.stringify(this.contextDoc));
358+
}
359+
if (this.frameDoc && JSON.stringify(this.frameDoc) !== '{}') {
360+
hash.set('frame', JSON.stringify(this.frameDoc));
361+
}
356362
hash.set('startTab', `tab-${this.outputTab}`);
357363
url.hash = hash.toString();
358364
return url.toString();

0 commit comments

Comments
 (0)