2020-06-04 14:56:45 +00:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [addScriptTag](./puppeteer.frame.addscripttag.md)
|
|
|
|
|
|
|
|
## Frame.addScriptTag() method
|
|
|
|
|
2020-07-09 13:22:58 +00:00
|
|
|
Adds a `<script>` tag into the page with the desired url or content.
|
|
|
|
|
2020-06-04 14:56:45 +00:00
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2020-07-09 13:22:58 +00:00
|
|
|
addScriptTag(options: FrameAddScriptTagOptions): Promise<ElementHandle>;
|
2020-06-04 14:56:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
2020-07-09 13:22:58 +00:00
|
|
|
| options | [FrameAddScriptTagOptions](./puppeteer.frameaddscripttagoptions.md) | configure the script to add to the page. |
|
2020-06-04 14:56:45 +00:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
Promise<[ElementHandle](./puppeteer.elementhandle.md)<!-- -->>
|
|
|
|
|
2020-07-09 13:22:58 +00:00
|
|
|
a promise that resolves to the added tag when the script's `onload` event fires or when the script content was injected into the frame.
|
|
|
|
|