@tldraw/editor
Version:
tldraw infinite canvas SDK (editor).
22 lines (20 loc) • 462 B
text/typescript
/** @public */
export const runtime: {
openWindow(url: string, target: string): void
refreshPage(): void
hardReset(): void
} = {
openWindow(url, target) {
window.open(url, target, 'noopener noreferrer')
},
refreshPage() {
window.location.reload()
},
async hardReset() {
return await (window as any).__tldraw__hardReset?.()
},
}
/** @public */
export function setRuntimeOverrides(input: Partial<typeof runtime>) {
Object.assign(runtime, input)
}