---
schema_version: "1"
id: 7d3b6e10149eb585d3c7e9ea3e77deb512b35bb489ffbf6d836ad1806f59e06e
title: Validate Secure Document Public API (secure-document)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/cli/cli-rules-secure-document.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/cli-rules-secure-document.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b681680fba20037c23868e7484d0e9905a2e824f55edb33fbec70c221b0819ef
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Validate Secure Document Public API (secure-document)

This rule validates that only supported functions and properties of the `document` global are accessed.

When Lightning Locker is enabled, the framework prevents the use of unsupported API objects or calls. That means your Aura components code is allowed to use:

- Features built into JavaScript (“intrinsic” features)
- Published, supported features built into the Aura Components programming model.
- Published, supported features built into Lightning Locker _SecureObject_ objects

Prior to Lightning Locker, when you accessed the `document` global, you could call any function and access any property available. When Lightning Locker is enabled, the `document` global is “wrapped” by a new SecureDocument object, which controls access to `document` and its functions and properties. SecureDocument restricts you to using only “safe” features of the `document` global.

**See Also**

- [Validate Aura API (aura-api)](https://developer.salesforce.com/docs/platform/aura-platform/guide/cli-rules-aura-api.md)
- [Validate Aura Component Public API (secure-component)](https://developer.salesforce.com/docs/platform/aura-platform/guide/cli-rules-secure-component.md)
- [Validate Secure Window Public API (secure-window)](https://developer.salesforce.com/docs/platform/aura-platform/guide/cli-rules-secure-window.md)
