On page https://learn.microsoft.com/en-gb/adaptive-cards/sdk/rendering-cards/javascript/actions, the example code fails if using the CDN version of AdaptiveCards in the browser.

This is because SubmitAction is not defined.
Either the example should be updated to ensure that SubmitAction is defined; or the if statement should be changed to:
if (action.constructor.name === 'SubmitAction') {
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
On page https://learn.microsoft.com/en-gb/adaptive-cards/sdk/rendering-cards/javascript/actions, the example code fails if using the CDN version of AdaptiveCards in the browser.
This is because
SubmitActionis not defined.Either the example should be updated to ensure that
SubmitActionis defined; or the if statement should be changed to:Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.