openWindow

See source code

Open a new window with the given URL and target. Prefer this to the window.open function, as it will work more reliably in embedded scenarios, such as our VS Code extension. See the runtime object in tldraw/editor for more details.

function openWindow(
  url: string,
  target?: string,
  allowReferrer?: boolean,
): void;

Parameters

NameDescription

url

string;

The URL to open.

target

string;

The target window to open the URL in.

allowReferrer

boolean;

Whether to allow the referrer to be sent to the new window.

Returns

void;

The new window object.

Prev
MenuClickCapture
Next
parseDeepLinkString