# toComponentEmbedScript

`function` in `discord-component-embed` · v0.2.2

<https://docs.seedcord.org/packages/discord-component-embed/0.2.2/functions/to-component-embed-script>

Returns the `<script>` tag Discord reads for a component embed, as an HTML string. Use it where you write raw HTML into the page yourself.

```ts
toComponentEmbedScript(root: EmbedElement): string
```

Returns the `<script>` tag Discord reads for a component embed, as an HTML string. Use it where you write raw HTML into the page yourself.

Parameters.

- `root` `EmbedElement`

Returns `string`.
