Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
Adaptive Card Javascript SDK Renders empty Div

I'm attempting to render an Adaptive Card via the Javascript SDK. I have attempted multiple versions of the SDK and used various samples from the Samples library on the Adaptive Cards official site.

In all cases, my code renders a:

<div class="ac-container ac-adaptiveCard" tabindex="0" style="display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box; flex: 0 0 auto; padding: 15px; margin: 0px;"></div>

I am using the boilerplate example code from the documentation.

        var adaptiveCard = new AdaptiveCards.AdaptiveCard();

        adaptiveCard.hostConfig = new AdaptiveCards.HostConfig({
            fontFamily: "Segoe UI, Helvetica Neue, sans-serif"
          
        });


        
        adaptiveCard.onExecuteAction = function (action) { alert("Ow!"); }

        

        
            // Parse the card payload
            adaptiveCard.parse(card);

            // Render the card to an HTML element:
            var renderedCard = adaptiveCard.render();
       

        console.log("Adaptive Card Rendered: " + renderedCard.outerHTML);

        var target = FifthMethod.Forms.Controls.AdaptiveCard._getInstance(objInfo.CurrentControlId);

        target.appendChild(renderedCard);
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I figured out that in my code I was receiving the adaptive card definition as a string. I had to use JSON.parse() to convert the string into a Javascript object. Once I did that, the issue resolved.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda