---
schema_version: "1"
id: e60b185fc5fb3f01c5a382d659e83ebd6e2c65ac39fbc14f17636f77d67473de
title: lightning:container NPM Module Reference
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/container/container-api-reference.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/container-api-reference.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: be8b11afdf7ccd6037d02d66b99ce3d44e68594e4973c0adf43fe9994a140b41
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# lightning:container NPM Module Reference

Use methods included in the lightning:container NPM module in your JavaScript code to send and receive messages to and from your custom Aura component.

-   **[addErrorHandler()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-addmessageerrorhandler.md)**  


    Mounts an error handling function, to be called when the messaging framework encounters an error.

-   **[addMessageHandler()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-addmessagehandler.md)**  


    Mounts a message handling function, used to handle messages sent from the Aura component to the framed JavaScript app.

-   **[callApex()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-callapex.md)**  


    Makes an Apex call.

-   **[removeErrorHandler()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-removemessageerrorhandler.md)**  


    Unmounts the error handling function.

-   **[removeMessageHandler()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-removemessagehandler.md)**  


    Unmounts the message-handling function.

-   **[sendMessage()](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-sendmessage.md)**  


    Sends a message from the framed JavaScript code to the Aura component.


