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.