Locker Service relies on the proxy object for its underlying implementation. The proxy function in JavaScript allows for adding custom behaviors to the JavaScript objects.
For intrinsic JavaScript objects, such as arrays, Boolean, string, dates, JSON, objects, and more, Locker Service returns raw JavaScript objects.
For non-intrinsic JavaScript objects, Locker Service filters and returns the proxy objects.
Locker Service provides documentation for modified, non-intrinsic JavaScript objects. The Locker API viewer documentation can be accessed at http://documentation.auraframework.Org/lockerApiTest/index.app?aura.mode=DEV. Observe the objects highlighted in orange; it shows that they have different implementations than the actual browser API.
The following table shows some of the objects that Locker Service filters and returns as proxy objects:
JavaScript Object | Locker Service Filtered Object |
HTML collection |
Proxy object |
Window object |
Secure window |
Document object |
Secure document object |
HTML element object |
Secure HTML element object |
Locker Service is supported by Chrome, Firefox, Safari, and Microsoft Edge. Note that Locker Service is not supported in IE11.