# PDFDocument.containsJavaScript

```ts
get containsJavaScript(): boolean
```

The document declares embedded JavaScript. The SDK never executes it; use this to screen untrusted uploads or warn the user.

- Kind: getter
- Since: 1.0.0

Returns `boolean`

Throws:

- `DOCUMENT_CLOSED` — read on a closed document.

```ts
if (doc.containsJavaScript) showWarning('This file contains scripts');
```

Part of [PDFDocument](https://kernstra.com/docs/web-sdk/api/pdfdocument) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfdocument/containsjavascript
