MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getEmbeddedHtml

Method getEmbeddedHtml

static/sharing.ts:460–469  ·  view source on GitHub ↗
(
        config: any,
        root: string,
        isReadOnly: boolean,
        extraOptions: Record<string, boolean>,
    )

Source from the content-addressed store, hash-verified

458 }
459
460 private static getEmbeddedHtml(
461 config: any,
462 root: string,
463 isReadOnly: boolean,
464 extraOptions: Record<string, boolean>,
465 ): string {
466 const embedUrl = Sharing.getEmbeddedUrl(config, root, isReadOnly, extraOptions);
467 // The attributes must be double quoted, the full url's rison contains single quotes
468 return `<iframe width="800px" height="200px" src="${embedUrl}"></iframe>`;
469 }
470
471 private static getEmbeddedUrl(config: any, root: string, readOnly: boolean, extraOptions: object): string {
472 const location = window.location.origin + root;

Callers 1

getLinksMethod · 0.80

Calls 1

getEmbeddedUrlMethod · 0.80

Tested by

no test coverage detected