Use this interface to specify what canvas context information is provided to your app by implementing the excludeContextTypes() method. Use this interface to call custom code when the app is rendered by implementing the onRender() method.
If you provide an implementation of this interface, you must implement excludeContextTypes() and onRender().
public class MyCanvasListener implements Canvas.CanvasLifecycleHandler{ public Set<Canvas.ContextTypeEnum> excludeContextTypes(){ Set<Canvas.ContextTypeEnum> excluded = new Set<Canvas.ContextTypeEnum>(); excluded.add(Canvas.ContextTypeEnum.ORGANIZATION); return excluded; } public void onRender(Canvas.RenderContext renderContext){ System.debug('Canvas lifecycle called.'); } }