@mocanvas/mocanvas · function

getEmbedDefinition

declare function getEmbedDefinition(url: string, definitions?: readonly EmbedDefinition[], config?: EmbedConfig): EmbedMatch | null

The permit-list entry for url, with the url to actually put in the iframe, or null when the url is not one we embed.

Rejects anything that is not http(s) (a javascript: or data: url never reaches an iframe), and matches hosts exactly, so a lookalike host that merely *contains* a permitted one is not embedded.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.