Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

141
Vistas
com.google.gwt.core.client.JavaScriptException: (TypeError) when I call method from constant in JS file from GWT

I have a file with this JS

const sdk = new ChartsEmbedSDK({
    baseUrl: 'https://mongodb.com....',
});

const chart = sdk.createChart({chartId: '1111111111111111111111111111'});

function loadDashboard() {
    chart.render(document.getElementById('chart'));
}

And call that from GWT code:

public static native void loadDashboard() /*-{
        $wnd.loadDashboard();
    }-*/;

It works. But when I do next In JS:

const sdk = new ChartsEmbedSDK({
    baseUrl: 'https://mongodb.com....',
});

const chart = sdk.createChart({chartId: '1111111111111111111111111111'}); 

and call:

public static native void loadDashboard() /*-{
    $wnd.chart.render($doc.getElementById('chart'));
}-*/;

I get error:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : ((intermediate value)(intermediate value) , $wnd).chart.render is not a function
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda