Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Canvas

Represents a response that starts or continues an Interactive Canvas session.

example
app.handle('welcome', (conv) => {
  conv.add('Welcome! Do you want me to change color or pause spinning? ' +
    'You can also tell me to ask you later.');
  conv.add(new Canvas({
    url: `https://your-web-app.com`,
  }));
});
see

Developer Documentation to learn more about Interactive Canvas.

Hierarchy

  • Canvas

Implements

Properties

Optional data

data: JsonObject[]

Optional. JSON data to be passed through to the immersive experience web page as an event. If the "override" field in the containing prompt is "false" data values defined in this Canvas prompt will be added after data values defined in previous Canvas prompts.

example
app.handle('start_spin', (conv) => {
  conv.add(`Ok, I'm spinning. What else?`);
  conv.add(new Canvas({
    data: {
      command: 'SPIN',
      spin: true,
    },
  }));
});

Optional enableFullScreen

enableFullScreen: boolean

If true the canvas application occupies the full screen and won't have a header at the top. A toast message will also be displayed on the loading screen that includes the Action's display name, the developer's name, and instructions for exiting the Action. Default value: false.

suppressMic

suppressMic: boolean

Optional. Default value: false.

url

url: string

Required. URL of the web view to load.

Generated using TypeDoc