---
schema_version: "1"
id: e9134fe2b95915ccb6293f3a1e145aab67e9fb6d7f45153dea036923b1f38efb
title: Canvas Namespace
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_namespace_Canvas.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Canvas.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5612c2e445eafa698c6e3bd8a3b9ad0506b05288518a1d2fe2c163e128df3e9b
description: The Canvas namespace provides an interface and classes for canvas apps in Salesforce.
---
# Canvas Namespace

The Canvas namespace provides an interface and classes for canvas apps in Salesforce.

The following are the interfaces and classes in the Canvas namespace.

- **[ApplicationContext Interface](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_canvas_ApplicationContext.htm)**  
    Use this interface to retrieve application context information, such as the application version or URL.
- **[CanvasLifecycleHandler Interface](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_canvas_CanvasLifecycleHandler.htm)**  
    Implement this interface to control context information and add custom behavior during the application render phase.
- **[ContextTypeEnum Enum](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_canvas_ContextTypeEnum.htm)**  
    Describes context data that can be excluded from canvas app context data. You specify which context types to exclude in the excludeContextTypes() method in your CanvasLifecycleHandler implementation.
- **[EnvironmentContext Interface](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_canvas_EnvironmentContext.htm)**  
    Use this interface to retrieve environment context information, such as the app display location or the configuration parameters.
- **[RenderContext Interface](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_canvas_RenderContext.htm)**  
    A wrapper interface that is used to retrieve application and environment context information.
- **[Test Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_canvas_Test.htm)**  
    Contains methods for automated testing of your Canvas classes.
- **[Canvas Exceptions](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_exceptions_canvas.htm)**  
    The Canvas namespace contains exception classes.

#### See Also

- [Canvas Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.platform_connect.meta/platform_connect/canvas_framework_intro.htm "Canvas Developer Guide - HTML (New Window)")