# toComponentEmbedScript

`function` in `discord-component-embed` · v1.0.0

<https://seedcord.org/docs/packages/discord-component-embed/1.0.0/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`.
